Friday, January 17, 2025
2 changes · saas-17.2
Resolved issues and error corrections
Inventory receipts for branch companies can now create or use lot and serial numbers owned by the parent company without triggering an incorrect company mismatch error. This prevents blocked stock operations for products managed at company level while used by branches.
Original PR description
Steps to reproduce the bug:
- Create a “Company A” and a “ branch 1” linked to this company
- Create a storable product “P1”:
- limited to Company A
- Select only the branch 1 as current company
- Create a receipt for one unit of P1
- Mark it as to do.
- Try to create a lot or use lot created in Company A
Problem:
An acces error is raised:
`Incompatible companies on records:
- 'Product B' belongs to company 'Branch X' and 'Lot/Serial Number' (lot_id: 'sn_test') belongs to another company.`
opw-4415565This fixes a website test so it consistently checks the intended website when validating language links. It helps prevent false test failures and supports more reliable website behavior across multi-site setups.
Original PR description
The Issue: Prior to this commit, invoking _get_frontend resulted in the get_current_website function returning a different website than the one specified in the MockRequest. The Fix: To resolve this, we ensure the function selects the correct website by explicitly passing it in the context. runbot-64729