Wednesday, April 2, 2025
7 changes · master
Resolved issues and error corrections
This change makes partner ranking updates in Accounting more efficient by avoiding unnecessary activity tracking during the update. It preserves the intended behavior while reducing background overhead, which can improve performance in routine accounting operations.
Original PR description
The function used to do the update directly in SQL and now we use the ORM (#197653). As a performance improvement, we can just disable tracking when setting the rank so that the implementation is closer to what it was. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a search issue where records linked through optional relationships could be matched incorrectly. Businesses should see more reliable search results in cases involving related companies or other linked records, without changing normal workflows.
Original PR description
When using autojoin, the semantics of 'any' are "there exists X such as domain", if the field is nullable, we must ensure that the relation field is not null.
An example domain `('company_id.parent_id', '=', False)` means there exists a company without a parent. In general, this is expressed as `company_id IN (select ... parent_id is null)`. However, if we autojoin, the WHERE clause from the subquery is merged into the main query, but then, `parent_id` may be null either because it is null in the company table or because the company does not exist.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fixes a problem where inherited configuration screens could be incorrectly marked as invalid when their parent view had a higher priority. Business users benefit from more accurate error indicators in Odoo's interface customization tools, reducing confusion during setup and maintenance.
Original PR description
When computing invalid view locators, the combined arch is constructed using views having a lower priority or equal priority with a lower id. This domain will not fetch parent views if the parent has a higher priority. The domain was intended only to exclude lower priority siblings to preserve the order, but it should include all parents regardless of priority. **Description of the issue/feature this PR addresses:** example on runbot: view `pos_enterprise.res_config_settings_view_form` has priority 15, it inherits `point_of_sale.res_config_settings_view_form` which has priority 95. The enterprise view and all its children are marked with red showing invalid locators. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a hidden issue in the time off module that could cause errors when checking remaining leave balances. The change removes unused calculation fields, reducing the chance of crashes without changing visible functionality for employees or managers.
Original PR description
Before this commit, the query set in _get_remaining_leaves would return the result inside a list, making the .get method on the result to end up in a crash. This commit fixes that.
This fix prevents crashes when Odoo checks view definitions that are empty or contain XML comments. It improves system stability by safely skipping content that should not be validated, reducing the risk of errors during view processing.
Original PR description
### [FIX] base: fix invalid_locators for empty arch.
The `_compute_invalid_locators` crashed when the view is a primary and has no arch (`ValueError: can only parse strings`).
Fix this by ignoring views without arch.
### [FIX] base: fix invalid_locators for comments.
The `_compute_invalid_locators` doesn't ignore XML comments. Then when a comment appears inside the arch, the ORM threw a `TypeError` because ` spec.tag` is not JSON serializable for comment nodes.
Fix this by ignoring comments.
### To check that the code is robust
```python
all_views = self.env['ir.ui.view'].search([])
for view in all_views:
assert not view.invalid_locators
```
Not assert not raised on a runbot database (all modules installed) with these fixes and the one located in https://github.com/odoo/odoo/pull/202048This fixes an error that appeared when staff tried to choose a preset time slot for a Point of Sale order. It helps restaurants and other PoS users complete timed orders without being interrupted by a system traceback.
Original PR description
Fix traceback when trying to set the `preset_time` on a PoS order. Steps to reproduce : - Activate prests in PoS config - Enable `Timing` inside Eat In preset - Open PoS - Create new order - Try to set slot `preset_time` by opening the popup - Traceback appear task-id: 4684049 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Payroll Advice report layout was adjusted to improve readability and presentation. Text alignment, spacing, and signature placement are now cleaner, helping businesses produce more professional payroll documents.
Original PR description
Steps: - Generate the Payroll Advice report. - Observe content alignment, spacing issues, and signature positioning. Issues: - Some text elements had inconsistent spacing and alignment affecting readability. Fix: - Improved text alignment and spacing for better readability. - Repositioned certain things as per requirement to enhance the overall layout. Task - 4642759