Please sign in to comment.
[FIX] website_sale: cached available pricelists
The result of the method `_get_pl` is cached: ``` @tools.ormcache('uid', 'country_code', 'show_visible', 'website_pl', 'current_pl', 'all_pl') ``` But, the result depends as well on the partner pricelist set in the partner form (or even the pricelist used correctly in his cart), and, unfortunately, this value is not among this method parameters. To force the recompute of the method when the partner pricelist change, one of the method arguments (mentioned above) must change. To serve this purpose, another method is created, adding the partner pricelist and the order pricelist among its parameter, to force the recomputation of the available pricelists when there is a change in the partner or order pricelist. The old method is kept for retro-compatibility purposes, and basically call the new one without the two last arguments For information, the pricelist in the cookie is set only when the user choose a pricelist different than the default one among the available pricelists. opw-670898
- Loading branch information...
Showing with 20 additions and 8 deletions.