Tuesday, February 27, 2024
1 change · saas-17.1
Resolved issues and error corrections
This update resolves an issue where users couldn't access product catalogs correctly when viewing them through sale orders. The fix ensures the catalog requests are made within the context of the sale order's company, preventing access errors and ensuring accurate product display. This improves the user experience for multi-company operations.
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Create a new company; 2. switch to it via the selector; 3. create a new product specific to the company; 4. create a sale order; 5. open the catalog via a sale order line. Issue ----- Access error Cause ----- The catalog controller loses track of the current company, so `env.company` defaults to the primary `company_id` of the user. Solution -------- Use `with_company` to update `env.company` to the order's company. opw-3690226 Forward-Port-Of: odoo/odoo#153915