Friday, March 19, 2021
2 changes · master
Resolved issues and error corrections
This fixes an issue where Odoo could use the wrong active company in web views for users with access to multiple companies. It helps ensure multi-company users see and work with data under the correct company, and adds safeguards to prevent the issue from returning.
Original PR description
This commit fix a bug introduced in #66551 where a mismatch has been done between session.user_context.allowed_company_ids and session.user_companies.allowed_companies. This commit also adds the following tests: - a JS test in order to prevent future unwanted issues regarding multi company in BasicModel. - a Python test in order to ensure that session_info['user_companies'] is not involuntarily changed. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures that more view processing errors include helpful location details, making it easier for teams to find and correct problems in source files. It reduces investigation time when view-related issues occur during development or upgrades.
Original PR description
A context is attached to the ValidationError object when elements in the view arch are broken. This context helps to locate the error in the source file. When the view processing fails outside of the arch evaluation, such context is missing. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr