diff options
| author | Romain Derie <rde@odoo.com> | 2019-03-12 10:07:07 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2019-03-14 10:28:02 +0000 |
| commit | f8efc9a957c28a428bb8ed994815e856b1f5e805 (patch) | |
| tree | 03d70aaf4105624401a10bca142fb1d07846649e /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 9608d4551d2ef9c2774c2d9574181f2c98923005 (diff) | |
[FIX] website_sale: fix _get_pl_partner_order
1. Encapsulate `show_visible` to avoid duplicate same code in filtered and to
make it more easy to read.
2. When GEOIP is enabled, `_get_pl_partner_order` would retrive the available
pricelists for that country group.
We should also ensure the returned pricelists are also available on that
website
3. Rewrite the `country_code` condition in one line thanks to 1.
4. !! Do not use `property_product_pricelist` in the method as it is not cached
and now it depends website. Anyway it was useless as it was a duplicate of
`partner_pl`.
5. Add `is_public` to the if condition as it was actually implicit as if not
public it and no pricelists it would go in previous condition and set the
pricelist from `property_product_pricelist`.
6. The last if condition (`not country_code`) has always been subject to fixes
and always broke a flow to fix another one (see 60300fc2 and e11908d42, both
were wrong).
This condition refactoring should still preserves the beavior fixes
mentionned in both commits and fix the flow where a logged in user would not
get selectable pricelists if he has a partner_pl (property_product_pricelist)
before entering the all_pl filtered.
closes odoo/odoo#28301
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
