diff options
| author | Romain Derie <rde@odoo.com> | 2019-03-12 10:06:55 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2019-03-14 10:28:02 +0000 |
| commit | 2d970942bae15a6e5378a05deec18295435c235f (patch) | |
| tree | 7738df030851b12018819973aa8db504b9dfbb01 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 08a17b68832b1c035730b4effa4cabbcc9580091 (diff) | |
[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
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
