-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 60300fc and e11908d, 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.
- Loading branch information
Showing
2 changed files
with
223 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters