Tuesday, April 29, 2025
11 changes · 18.0
Resolved issues and error corrections
This fix makes Odoo's automated tests more stable by preventing one failed WebSocket-related test from affecting the next test. It reduces random build failures and helps teams trust test results during development and maintenance.
Original PR description
Build error 162704 Will be backported in 16.0 via 207975 (focusing on 18.0->master to start) Follow-up on other WebSocket fixes, this time for the execution of the WebSocket request inside the same test, but not after a Chrome browser. This case is quite specific and is related to a low timeout set on websocket_connect, leading to the request being randomly executed inside the test. This is a problem for the current test (fixed by increasing the timeout), but also for the next test: if the TestCursor rollback fails, the cursor_stack of the TestCursor is not emptied, leading to a case where an existing read-only test cursor in the stack makes the next TestCursor read-only, causing chain failures. This pr adresses the problem by - increasing the timeout - making the TestCursor.close more robust - Ensuring that the cursor_stack is empty at the end of a test.
Withholding calculations now use the correct company or branch records when determining taxable amounts and prior withholdings. This prevents payments or vendor bills made in a branch from being incorrectly affected by the parent company's accounting entries.
Original PR description
When calculating earnings-based withholdings in company-branch setups, the logic incorrectly referenced accounting entries from the mother company if the user belonged to a branch. This led to incorrect accumulation of taxable base amounts and previously withheld amounts, especially when vendor bills or payments were made in a branch. This fix ensures that: - The accumulation logic in `_tax_compute_all_helper` correctly scopes move line searches using the user's company. As a result, withholding retention now behaves correctly in company-branch environments. opw-4581579 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an unstable automated test for Odoo's mail messaging area that could fail depending on timing. The change helps keep test results consistent, reducing false alarms during quality checks without changing user-facing behavior.
Original PR description
Before this commit, the test "Message shows up even if channel data is incomplete" would sometimes fail. This happened because it waited for a bus subscription triggered by a call to the `_forceUpdateChannel` method of the bus service. However, this method is debounced, and as a result, the subscription sometimes occurred too late, causing the test to fail. This commit resolves the issue by using `runAllTimers`, which immediately executes the debounced method. fixes runbot-76011
The website page properties test tour was updated so required page elements are visible before the test continues. This helps keep automated quality checks reliable and reduces false failures during development.
Original PR description
Thanks to [1], we can now fix the website page properties tour ensuring that the necessary elements are visible on the page. [1]: https://github.com/odoo/odoo/commit/4e25c13c918382afb34013a6dd30aac4a0ce4e84 runbot-106391 Co-authored-by: Pierre Pulinckx
Event tickets sold through Point of Sale now show the correct sales status. This prevents completed or draft PoS ticket orders from being incorrectly marked as free, giving staff a more accurate view of ticket sales.
Original PR description
Sale status was not correctly set when ticket where sold from the POS. Steps to reproduce: ------------------- * Create an event and make sure ticket can be sold in PoS * Open PoS * Add a ticket to the order and complete the order * Add another ticket to the order but go to the backend to save it as draft > Observation: The sale status of the order appears as 'free' when it should be "Sold" and "Not Sold" Why the fix: ------------ We make sure to take the state of the PoS order when the ticket has been sold through the PoS. opw-4584390
This update ensures a loyalty-related automated test only runs when the discount feature it needs is installed. It prevents false test failures in setups that use loyalty features without the separate point-of-sale discount module.
Original PR description
PR #202334 introduced a test in `pos_loyalty` that depends on the field `discount_product_id` that is created in the module `pos_discount`. However, `pos_loyalty` and `pos_discount` does not have dependence, so the fails if `pos_discount` is not installed. This PR only runs it when `pos_discount` is installed. opw-4622428
Multi-page PDF quotes using the Bubble or Boxed document layouts now display the totals table correctly on the final page. This prevents totals from being cut off at the bottom of the previous page, improving the readability and professionalism of customer-facing quotes.
Original PR description
## Version: 18.0+ ## Issue: PDF quotes on multiple pages having only the total table on the last page encounter a display issue. The total table is cut and partially displayed at the bottom of the…
## Version:
18.0+
## Issue:
PDF quotes on multiple pages having only the total table on the last page encounter a display issue. The total table is cut and partially displayed at the bottom of the penultimate page.
## Steps to reproduce:
- Install Sales app;
- Navigate to the Settings app:
- Under the `Companies` section, configure the document layout: - Ensure the `Bubble` (or `Boxed`) layout is selected;
- Navigate to the Sales app:
- Create a new quote with 8x `Chair floor protection`;
- Via the `Actions` gear button, print the `PDF Quote`.
## Cause:
Complete code refactoring for documents layouts styles introduced by https://github.com/odoo/odoo/pull/169512 has probably not been tested on that use case.
## Fix:
<img width="1105" alt="Capture d’écran 2025-04-03 à 10 25 58" src="https://github.com/user-attachments/assets/67bce15e-c5e9-40f8-9fbf-7721afc98ae5" />
opw-4624623
opw-4627809
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prBelgian payroll declarations now support the updated Dimona V2 requirements. This helps companies remain compliant when submitting employee contract information to the Belgian authorities.
Printed payslips now respect the payslip structure setting for worked day lines. When worked day lines are disabled on the payslip form, the printed report no longer shows that table, avoiding confusion for employees and payroll teams.
Original PR description
- If the payslip sturct has `use_worked_day_lines = False` the printed payslip shoud not have worked_days_table Task: 4720429
Salary attachments, such as garnishments or deductions, are now applied only when the employee's payslip uses the appropriate input-based salary structure. This prevents incorrect payroll calculations in cases where a different salary structure is used, helping ensure employees are paid accurately.
Original PR description
task-4751862
Customer statement PDFs sent for multiple partners now use the correct company information when generated in the background. This prevents wrong addresses, footers, and other company details from appearing on statements in multi-company setups.
Original PR description
### Steps to reproduce: - Accounting > Reporting > Partner Ledger - Select multiple partners - Select "Customer Statements" as report - Click "Send" - Go to the one of the partner in question and open the generated PDF - The address is not the one of the company, the footer doesn't show the right company, etc ### Cause: When sending to multiple partners, the action is dispatched with cron so a new `env` is created. This `env` has all companies active and the first one as main company. So in the end the wrong company is used to generate the report. ### Solution: In the cron when calling `_process_send_and_print` we give `report.with_company(company)` to make sure that the value the report will us are the one from the correct company. Also revert the small [fix](https://github.com/odoo/enterprise/pull/82320/files) that was made before, which is no longer needed. opw-4635283