[REV] account: fix the switch to another company
This reverts the following commits: https://github.com/odoo/odoo/pull/72977/commits/acdc4547fb6f6128debc3ff1f4cbf5b2f772239f The fix we initially made did not cover every possible scenario. Steps to reproduce the bug: - Install accounting - Connect as admin in a multi-company environment, e.g: “Mitchell Admin” - Go to the related partner form's view linked to “Mitchell Admin” - in the “Sales & Purchase” tab > set this partner as a vendor and select the current company in the company field - create a bill in accounting and choose “Mitchell Admin” as vendor > save - Try to switch from a company to another - Validation error is triggered Problem: When changing the current company of a user, the company of the partner linked to that user will also be changed. So the constraint check “_check_company_and_invoices” will be triggered OPW-2642942 OPW-2641402 OPW-2641399 OPW-2639942 OPW-2643541 OPW-2643399 closes odoo/odoo#76434 Signed-off-by:Josse Colpaert <jco@openerp.com>
Loading
Please register or sign in to comment