7ad5f2efbff0bffe3b86ac568aa183dd29850c40
Issue Description:
The partner() function previously inferred the country using GeoIP
when no specific country (nor "all_countries") was specified.
However, if there were no partners from the inferred country,
the render function would lead to a broken screen.
Resolution:
Implemented a fallback mechanism to treat the situation
as if no country was specified. This ensures that all partners are displayed
in such cases, preventing the occurrence of a broken screen.
[Reproducing bug]
- odoo 16.4 with: website, contacts, crm_enterprise_partner_assign
- Simulate GeoIP on the backend, so it points to some COUNTRY_A:
- this can be achived by adding `country= country_obj.search([('name', 'ilike', 'mex')])`
[below this line](https://github.com/odoo/odoo/blob/57d43aca2b07d3469a937890b7d5e5c4f29fe250/addons/website_crm_partner_assign/controllers/main.py#L237)
- note: it doesn't matter which country you set it to, AS LONG AS COUNTRY_A != COUNTRY_B
- in CRM/Contacts:
- create partner (set Partner Level and country to COUNTRY_B of the record )
- Publish partner by "Go to website" -> Published
- go to url: ODOO_WEBSITE/partners
- BUG: No Partners are displayed
opw-3598110
closes odoo/odoo#148822
X-original-commit: cfca987efe83e6a6ba27779246a2d5da6b86dc7f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Andrzej Pietrusiak (pian) <pian@odoo.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, ...
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.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%