Daily updates from Odoo
Sunday, July 13, 2025
4 changes
2 changes
Resolved issues and error corrections
Creating an invoice from a sales order could fail if a related auto-created project had been deleted first. The fix safely ignores missing linked distribution accounts, allowing invoicing to continue instead of showing a deletion error.
Original PR description
When creating an invoice from a sales order linked to a service-type product that auto-generates a project, deleting the project before invoicing caused an error: "Record does not exist or has been deleted." This fix filters `browse()` result using `exists()` to ensure that the linked distribution account still exists. Steps to reproduce: - Create a service product that creates a project on order - Add it to a sales order and confirm - Delete the project - Try to create an invoice → error occurs opw-4891937 Forward-Port-Of: odoo/odoo#217870
This change makes stock quantity report tests use a fixed time so they no longer fail around midnight. It improves the reliability of automated checks without changing customer-facing stock features.
Original PR description
The tests: - `test_report_stock_quantity` - `test_report_stock_quantity_with_product_qty_filter` can fail if the test class was instantiate at midnight and the tests launched at 00:01. The issue has…
The tests: - `test_report_stock_quantity` - `test_report_stock_quantity_with_product_qty_filter` can fail if the test class was instantiate at midnight and the tests launched at 00:01. The issue has been explained extensively in d1e11dc2b41e66709ddd89beded32872af4118b9 Here is a modest retranscription of its holy analysis: The Test class `TestReportStockQuantity` inherit from `TransactionCase`. So, once initialized, a SQL transaction is started and is the same for all the tests of the class: https://github.com/odoo/odoo/blob/d86409d93e096126b32cbb35f442db332628375d/odoo/tests/common.py#L775-L778 Also, in a SQL request, the method `now()` does not really return the current date: > Notice that NOW() and its related functions return the start time of the current transaction. In other words, the return values of the function calls are the same within a transaction. (https://www.postgresqltutorial.com/postgresql-date-functions/postgresql-now/) So, if we we start all the tests of the class `TestReportStockQuantity` at the end of D01. The SQL transaction is created and the tests are executed one by one with a NOW() corresponding to D01. However, certain indiviual tests might be launched on the following day D02 because it takes time to run the rest of the tests of the class: In particular, the python "today()" will notgive the same date as the SQL NOW and the queries of the test will simply not perform the expected. E.g: https://github.com/odoo/odoo/blob/d86409d93e096126b32cbb35f442db332628375d/addons/stock/tests/test_report_stock_quantity.py#L105-L110 runbot-226726 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#216984 Forward-Port-Of: odoo/odoo#215424
1 change
Resolved issues and error corrections
This change reverses a previous broad update that was creating repeated conflicts during forward ports without preventing future errors. The project will instead handle the issue through targeted test whitelisting, reducing maintenance friction with minimal business impact.
Original PR description
Change is noisy, conflicts on every forward port, and doesn't preclude adding more errors. Whitelist on the test side instead.
1 change
Resolved issues and error corrections
The Post button on accounting entries will now be hidden when posting is not allowed, such as for already posted or auto-scheduled entries. This removes a confusing option from the screen and better aligns the interface with the system's actual rules.
Original PR description
[FIX] account: ensure `hide_post_button` is declared in form view The `hide_post_button` field is used in the `invisible` condition of the "Post" (`action_post`) button on `account.move` form views. However, it was not explicitly declared in the view, which caused the button to be always visible even when it should be hidden. This commit adds the missing field to the form view (invisible), so the `invisible` condition is properly evaluated by the client UI. This fixes a UI inconsistency where the Post button appears for posted or auto-scheduled entries, despite backend logic preventing their posting. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: