f8efc9a957c28a428bb8ed994815e856b1f5e805
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 (see60300fc2ande11908d42, 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>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%