Friday, January 17, 2025
30 changes
2 changes
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
3 changes
Resolved issues and error corrections
The sales commission report now loads much faster by making database lookup rules match the invoices included in the report. This removes a slowdown that affected large databases, reducing report load times from minutes to seconds in benchmarked cases.
Original PR description
## Description Following 9a8777b4b96367597418cdc1c1ffc7ea3264113f, the criteria on the `move_type` of the invoices used in `sale.commission.report` was changed from `'out_invoice'` to `'out_invoice' AND 'out_refund'`, but the respective index `account_move_invoice_user_id_date_idx` partial clause hasn't been updated, leading to Postgres not being able to use the index, leading to a performance regression. We're updating both custom indexes partial clause to match the invoice `move_type` condition used in the reporting. ## Benchmark On a large database with millions of invoices and customers | Timings (hot) | Before | After | |---------------|--------|-------| | 1 read_group | 40s | 1s | | full load | 225s | 6s | ## Reference task-4448879
This update improves the internal automated test setup used for Odoo's frontend features. It helps test data behave more like real system records, reducing false failures and making future updates safer across affected apps.
Original PR description
This commit handles various fixes for the Hoot testing framework & other frontend unit test helpers. Community: https://github.com/odoo/odoo/pull/193937
A bug was fixed that caused an error when users selected an existing order from the order list and tried to load it. This helps Point of Sale staff resume or review orders more reliably, reducing interruptions during service.
Original PR description
Before this commit, selecting an order from the order list and attempting to load it would result in an error. opw-4251717 X-original-commit: 2cd72396d9f96cd7770154c56355ec864e0926e9