Use root to search on period and search on closed periods

products_by_location can be called by users without read access to period.
And only closed period has cache.

review875002
(transplanted from 09d5333339c1d345dae85e5f3180d8a240bf5848)

--HG--
extra : transplant_source : %09%D5339%C1%D3E%DA%E8%5E_1%80%D8%A2%40%BFXH