Please sign in to comment.
[FIX] website_sale: limit pricelist to it's website if set
Before this commit: 1. Non Public User would get the main company pricelist returned when calling `get_current_pricelist`. As this is saved in an `ir.property` (`property_product_pricelist`) that is not website dependant, that pricelist would always be returned on every website. This is a problem if that pricelist is website limited, you should not be able to use it on other websites. 2. Public User would not have a valid pricelist on other website than the default one. Indeed, every pricelists are restricted that default website. It would result in prices shown as "0" (without currency symbol) on the shop 3. Pricelists set as selectable without a website_id set would not be selectable 4. Public User would not get a fallback pricelist when reading its `property_product_pricelist`. Indeed, the public user's partner is not active and since the refactoring of this field compute method to be a multi, it would end up doing a search() instead of a browse(). Thus, it would find a pricelist for the public user but it would not set it. This commit: 1. We override and check that pricelists returnes by the `ir.property` are indeed available on the current website. 2. Remove the website restriction on `Public Pricelist` so other websites have at least one pricelist available. 3. `pricelist_ids` on `website` now return all available pricelists including the ones that are generic (no website set) 4. We search for inactive partners too. Part of this commit fixes part of 27861 Github-25109
- Loading branch information...
Showing with 81 additions and 15 deletions.