992532e9efda62de7ae54b4807fae456ebac94e8
Bug:
1. Have at least 2 companies ("A" and "B")
2. Export an xml (Bis 3 for instance) for an invoice with customer
"Azure Interior"
3. Set a company on "Azure Interior" (say: A)
4. Import the xml in multicompany mode, with current company = B The
partner "Azure Interior" should be retrieved, but when writing it on the
invoice, it will throw a UserError "odoo.exceptions.UserError:
Incompatible companies on records: 'Draft Invoice (* 63)
(INV/2024/00006)' belongs to company 'B' and 'Partner'
(partner_id: 'Azure Interior') belongs to another company."
Cause:
We try to write a partner on an invoice belonging to another company. It
only occors when we have several companies selected because there is the
global rule `base.res_partner_rule` that will add `('company_id', 'in',
company_ids + [False])` to any search domain on the partner
(`company_ids` is replaced by `env.companies.ids`, see `_eval_context`).
Fix:
Ensure any search domain contains `env.company.id`: the `company_id` of
the move being created.
opw-3829223
closes odoo/odoo#162019
X-original-commit: 18119d446bdca9c04b7085bd1a1bd2f0e0b94ff3
Related: odoo/enterprise#60816
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@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%