Skip to content
Snippets Groups Projects
Commit 8f643035 authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[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: default avatarJosse Colpaert <jco@openerp.com>
parent 7b3458eb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment