Friday, November 8, 2024
2 changes · saas-17.4
Resolved issues and error corrections
Users can now mention colleagues who belong to a different or more limited set of companies without triggering an access error. This prevents failed note posting and inbox notifications in multi-company setups, making internal communication more reliable.
Original PR description
In a multi-company DB, mentioning a user with less allowed companies would result to "Access to unauthorized or invalid companies." Steps to reproduce: - Create 2 companies "YourCompany" and…
In a multi-company DB, mentioning a user with less allowed companies would result to "Access to unauthorized or invalid companies." Steps to reproduce: - Create 2 companies "YourCompany" and "TestCompany" - Set Mitchell Admin allowed in both companies - Set Marc Demo allowed to only "TestCompany" - Set Marc Demo User Notification Preferences to "Handle in Odoo" - Check both companies on Mitchell Admin - Open a contact record and log a note with `@Marc Demo` mention => Dialog with `Access to unauthorized or invalid companies.` This happens because the sending of bus notification related to inbox messages is made from the recipient, in this case Marc Demo. The context data still refer to Mitchell Admin, so `allowed_company_ids` still contain the 2 companies. Because of this, any search like `ResUsers.search(id,=,DemoUserId)` raises an exception from allowed_companies containing invalid companies for Marc Demo. This commit fixes the issue by overwriting the allowed companies in context to the user recipient that will receive the Inbox message. This overwrite only applies in the `.with_user()` scope. opw-4231529 Fix is similar to https://github.com/odoo/odoo/pull/46554
This update fixes Belgian payroll DmfA declaration calculations, including rounding, structural reductions, and 13th month proration. It helps ensure payroll declarations are more accurate and compliant, reducing the risk of incorrect reported amounts.
Original PR description
…aration TaskID: 4283466