Daily updates from Odoo
Friday, April 4, 2025
21 changes · master
Enhancements to existing features
Bank reconciliation logic was reorganized to handle recalculations more safely when liquidity lines are reloaded. This reduces the risk of inconsistent statement handling and supports smoother accounting workflows, including Mexican electronic invoicing scenarios.
Original PR description
…ity_line() as a context manager Due to the cache invalidation that occurs in order to force the recomputation of computed fields, we need to track the statement line in the context. Previously, this was managed manually in a stable-version fix: https://github.com/odoo/enterprise/commit/46f838403c8d60760a5b37cb5fe8d052d2307999 This commit improves the approach by refactoring _action_reload_liquidity_line() into a context manager. no-task
Odoo Studio users can now edit placeholder text on multi-line text fields, bringing this option in line with other field types. This helps teams add clearer guidance directly in forms without custom development.
Original PR description
This commit adds the ability to edit the placeholder attribute from studio on multi-lines text fields. It was only supported on most other types of fields, and the placeholder attribute is supported for a while. A test has been added as well.
The Planning calendar now avoids showing the Edit button when a user does not have permission or ability to edit the item. This makes the calendar popover clearer and prevents users from trying actions that are not available to them.
Original PR description
This commit is the counterpart of odoo/odoo#204734 where the buttons logic inside the popover footer of the calendar view has been slightly reworked. task-4606641
This update adds automated checks for the Documents drag-and-drop experience, helping ensure the feature keeps working as expected. It also preserves the helpful shortcut indicator when users drag documents over the search panel while holding Ctrl, reducing confusion during file organization.
Original PR description
Add some unit tests for the new Drag and Drop feature using Hoot. Task-4681175
The appraisal form now shows helpful tooltip guidance for employee and manager feedback visibility toggles. This makes it easier for users to understand what publishing each type of feedback does before changing visibility settings.
Original PR description
The `help` parameter is used in the `employee_feedback_published` and `manager_feedback_published` fields to add a tooltip. Labels are used to display the help message for each field. task-4558176
Resolved issues and error corrections
The VoIP module now avoids asking for a field that can already be determined automatically. This reduces friction for related workflows and makes testing or dependent customizations easier without changing the core user experience.
Original PR description
This is highly annoying for tests and dependant modules, while this field is used in 3 flows and can be easily deduced.
Code cleanup and technical improvements
Sales commission achievement features have been moved back into the main Sales Commission module, replacing the temporary linked achievement module. This reduces module complexity while keeping the same commission tracking capabilities available in the standard sales commission flow.
Original PR description
…_achievement Since https://github.com/odoo/enterprise/pull/77483 a technical module introduced to do breaking changes in stable: sale_commission_linked_achievement. This commit move the functionallities back in sale_commission. taskid: 4630052
The online appointment website component was reworked to use Odoo's newer interaction approach. This keeps the feature aligned with the platform's current architecture while preserving the customer-facing appointment booking experience.
Original PR description
task-4367641
This change reorganizes how spreadsheet filter matching is handled behind the scenes. It removes a shared global mechanism in favor of more localized handling, reducing maintenance risk without changing expected user behavior.
Original PR description
Task: 4684668
Miscellaneous changes
Description ------------ Fix a performance issue in the partner search functionality used in the sharing widget. The problem was related to the PostgreSQL query planner choosing a suboptimal execution plan when using a limit of 4 records. With a very low limit of 4, PostgreSQL would choose to perform an index scan on the `complete_name` index instead of using the more efficient trigram indexes. This resulted in high I/O operations as it traversed the index from A until finding matches, caus
Original PR description
Description ------------ Fix a performance issue in the partner search functionality used in the sharing widget. The problem was related to the PostgreSQL query planner choosing a suboptimal…
Description ------------ Fix a performance issue in the partner search functionality used in the sharing widget. The problem was related to the PostgreSQL query planner choosing a suboptimal execution plan when using a limit of 4 records. With a very low limit of 4, PostgreSQL would choose to perform an index scan on the `complete_name` index instead of using the more efficient trigram indexes. This resulted in high I/O operations as it traversed the index from A until finding matches, causing significant performance degradation. The fix simply increases the limit to 8, consistent with other `name_search` operations, ensuring the query planner consistently chooses the trigram index path regardless of the search term. Benchmark ---------- On a database with over 8 digits count of partners, a non selective search of a partner (5 chars) took: | Before | After | Speedup | |--------|-------|---------| | 27.4s | 42ms | 652x | Reference --------- task-4686893 Forward-Port-Of: odoo/enterprise#82680
Fixing the tour that has been introduce here https://github.com/odoo/enterprise/pull/75658/commits/c2d18cea5db278b5a3203c4d3646411fc9bbd450 runbot-110627 Forward-Port-Of: odoo/enterprise#81776
Original PR description
Fixing the tour that has been introduce here https://github.com/odoo/enterprise/pull/75658/commits/c2d18cea5db278b5a3203c4d3646411fc9bbd450 runbot-110627 Forward-Port-Of: odoo/enterprise#81776
Versions -------- - saas-17.4+ Price already hidden in 17.0 & earlier. Steps ----- 1. Set website to prevent sale of zero-priced products; 2. create a zero-priced pricelist; 3. create a rental product; 4. set a rental price of $0 on the zero-priced pricelist; 5. go to rental product page on website. Issue ----- It displays "$0.00/day" above the "Not Available for Sale" text. Cause ----- The rental price element doesn't check whether zero-priced products should be made ava
Original PR description
Versions -------- - saas-17.4+ Price already hidden in 17.0 & earlier. Steps ----- 1. Set website to prevent sale of zero-priced products; 2. create a zero-priced pricelist; 3. create a rental product; 4. set a rental price of $0 on the zero-priced pricelist; 5. go to rental product page on website. Issue ----- It displays "$0.00/day" above the "Not Available for Sale" text. Cause ----- The rental price element doesn't check whether zero-priced products should be made available for sale. Solution -------- If the rental price is zero, and the website prevents sale of zero-priced products, hide the rental price element. We can use `combination_info['prevent_zero_price_sale']` for this thanks to commit 1f827ac1fad opw-4643155 Forward-Port-Of: odoo/enterprise#82849 Forward-Port-Of: odoo/enterprise#82535
* stock{,_barcode, _barcode_quality_control}, quality_control ### Issue: Quality checks per operation and per product are generated by an override of the action confirm of the move. However, if a move line is created on a non draft picking, it will end up in a move that will never be confirmed. This happends because the move is created with a state to match its already existing picking and hence is not confirmed at creation and since only draft pickings are confirmed at the start of the bu
Original PR description
* stock{,_barcode, _barcode_quality_control}, quality_control ### Issue: Quality checks per operation and per product are generated by an override of the action confirm of the move. However, if a…
* stock{,_barcode, _barcode_quality_control}, quality_control
### Issue:
Quality checks per operation and per product are generated by an override of the action confirm of the move. However, if a move line is created on a non draft picking, it will end up in a move that will never be confirmed. This happends because the move is created with a state to match its already existing picking and hence is not confirmed at creation and since only draft pickings are confirmed at the start of the button validate. As a result, we will not create the quality checks related to these additional moves.
The above issue can be triggered in many situations. Here are the two major ones:
### Use case I:
Creating a delivery or an internal transfer on the fly from the barcode app.
### Steps to reproduce:
- Create a storable product P with a barcode: XXX
- Go to Quality > Quality Control > Quality Points > New
- Create a new quality point for your product: Control per: "Operation" Operations: "Delivery"
- Go to the barcode app > Operations > Delivery > New
- Scan your product
- Validate the Delivery
#### > the picking is done but no QC was created nor processed.
### Cause of the issue:
The `save_barcode_data` will launch the creation of the move line related to the barcode line you edited from the barcode app. During the create of this 'stock.move.line', an associated move will be created and its initial "state" will be the current state of the picking: https://github.com/odoo/odoo/blob/ba799a020dd2b07c9d6c379e23acee1e6fcc5e0a/addons/stock/models/stock_move_line.py#L354-L356 https://github.com/odoo/odoo/blob/ba799a020dd2b07c9d6c379e23acee1e6fcc5e0a/addons/stock/models/stock_move_line.py#L942 At this point the picking state is "draft" and the move will be correctly created in draft. However, just a few lines after its creation, we will check if a reservation should be done with that move and if its state should be recomputed:
https://github.com/odoo/odoo/blob/ba799a020dd2b07c9d6c379e23acee1e6fcc5e0a/addons/stock/models/stock_move_line.py#L379-L396 the discrepancy is caused by the fact that `move._should_bypass_reservation` will be true if the picking is a receipt and false for the other types because you should bypass reservation for moves whose source is not an internal location but you should not for others. This will leave the moves and picking in draft state if its a receipt and update it for other types. However, only draft pickings are confirmed at the beginning of the button validate: https://github.com/odoo/odoo/blob/b0cfeecacfc6b95659778dfe4d62435556aaa92c/addons/stock/models/stock_picking.py#L1131-L1133
### Use case II:
Create and confirm a picking of any type so that it ends up being assigned. Add manually a move line via the detailed operations.
### Steps to reproduce:
- Create two storable product P1 and P2 put 10 units of both in stock
- Go to Quality > Quality Control > Quality Points > New
- Create a new quality point for your product P2: Control per: "Operation" Operations: "Delivery"
- Create and confirm a Delivery for 1 unit P1
- Go to Detailed Operations > create a new line for 1 unit of P2
- Validate the Delivery
#### > the picking is done but no QC was created nor processed.
### Cause of the issue:
For the same reasons as above, the newly created move is assigned as it mimics the state of the current picking which is assigned since we have already reserved the already existing move.
### Fix:
We ensure the creation of quality checks for moves that end up being created but will never be confirmed.
### Technical limitation:
Unfortunately, it is not possible to manage the use case of quality checks related the component of a kit product without disrupting the barcode flows. Indeed, in barcode flows, the move line as well as its related move is created by a `save_barcode_data`. If we were to confirm the newly created moves rather than just trying to create the QC, it would indeed first explode the bom and then create the related QC for each component. However, the barcode data would not coincide anymore with the back end data since the line we just saved would have been exploded at backend creation. For that reason we do not yet support the above use cases for kit products.
Community: https://github.com/odoo/odoo/pull/202725
opw-4480104
Forward-Port-Of: odoo/enterprise#82643
Forward-Port-Of: odoo/enterprise#81850Pytz raises a `NonExistentTimeError` or an `AmbiguousTimeError` when trying to get the offset of a non localized datetime during the daylight saving changing time. Remark: the `_is_customer_in_the_same_timezone` method name should be changed in master as it does the complete opposite. runbot error 162039 Fix courtesy of @Xavier-Do Forward-Port-Of: odoo/enterprise#82810
Original PR description
Pytz raises a `NonExistentTimeError` or an `AmbiguousTimeError` when trying to get the offset of a non localized datetime during the daylight saving changing time. Remark: the `_is_customer_in_the_same_timezone` method name should be changed in master as it does the complete opposite. runbot error 162039 Fix courtesy of @Xavier-Do Forward-Port-Of: odoo/enterprise#82810
This commit fixes the overlapping between the dialog and file viewer due to a combination of the z-index value set by the .modal class and the .fixed-top utility class. This is the counterpart of the related community change in FileViewer. Forward-Port-Of: odoo/enterprise#82186
Original PR description
This commit fixes the overlapping between the dialog and file viewer due to a combination of the z-index value set by the .modal class and the .fixed-top utility class. This is the counterpart of the related community change in FileViewer. Forward-Port-Of: odoo/enterprise#82186
Forward-Port-Of: odoo/enterprise#72380
Original PR description
Forward-Port-Of: odoo/enterprise#72380
- l10n_de_pos_res_cert/static/tests/tours/fiskaly_tour.js Add wait request steps (to fix undeterministic behavior). - mrp_workorder/tests/test_shopfloor.py Add a step_delay=500. This step delay will be removed from codebase soon. This is an intermediate fix. - website_sale_renting/static/tests/tours/website_sale_renting_select... Avoid the usage of datepicker interface that causes problems for now in tours. Forward-Port-Of: odoo/enterprise#82554 Forward-Port-Of: odoo/enterprise#82524
Original PR description
- l10n_de_pos_res_cert/static/tests/tours/fiskaly_tour.js Add wait request steps (to fix undeterministic behavior). - mrp_workorder/tests/test_shopfloor.py Add a step_delay=500. This step delay will be removed from codebase soon. This is an intermediate fix. - website_sale_renting/static/tests/tours/website_sale_renting_select... Avoid the usage of datepicker interface that causes problems for now in tours. Forward-Port-Of: odoo/enterprise#82554 Forward-Port-Of: odoo/enterprise#82524
Dynamically use the latest `html_migrations` version in the `knowledge_history_tour` to avoid having to update the test every time a new html version is deployed. task-4640490 Forward-Port-Of: odoo/enterprise#82817 Forward-Port-Of: odoo/enterprise#81344
Original PR description
Dynamically use the latest `html_migrations` version in the `knowledge_history_tour` to avoid having to update the test every time a new html version is deployed. task-4640490 Forward-Port-Of: odoo/enterprise#82817 Forward-Port-Of: odoo/enterprise#81344
Steps to reproduce the bug: - Create a storable product “P1”: - Create a BoM - Go back to the product form and create an ECO: - Apply on: “Bill of Materials” - The created BoM will be selected automatically. - Save. - Return to the product form. - The ECO count in the smart button is 1. - Click on it. Problem: No ECO is displayed because the domain filters only ECOs applied to the product: https://github.com/odoo/enterprise/blob/ec6b4717f49ccd5b651be80aed21494ed
Original PR description
Steps to reproduce the bug: - Create a storable product “P1”: - Create a BoM - Go back to the product form and create an ECO: - Apply on: “Bill of Materials” - The created BoM will be selected…
Steps to reproduce the bug:
- Create a storable product “P1”:
- Create a BoM
- Go back to the product form and create an ECO:
- Apply on: “Bill of Materials”
- The created BoM will be selected automatically.
- Save.
- Return to the product form.
- The ECO count in the smart button is 1.
- Click on it.
Problem:
No ECO is displayed because the domain filters only ECOs applied to the product:
https://github.com/odoo/enterprise/blob/ec6b4717f49ccd5b651be80aed21494ed500f580/mrp_plm/models/product.py#L17-L20
Solution:
only ECOs of type "Product" should be counted in the product form.
Issue 2:
- Try updating the "Apply on" field of the ECO to “Product.”
Problem:
The "Bill of Materials" field becomes invisible but is not cleared. As a result, when counting the number of ECOs linked to the BoM, the count will be incorrect.
https://github.com/odoo/odoo/blob/f2923dec56b5ba2436bc244337c1e430a85e7e94/addons/stock/models/stock_move.py#L45-L48
opw-4653598
Forward-Port-Of: odoo/enterprise#82576[FIX] hr_appraisal: prevent TypeError for raw record data The read method in hr_appraisal.py was raising a TypeError 'NoneType object is not iterable' when the fields parameter was None. This occurred because the code attempted to create a set from the None value directly. Steps to reproduce: ------------------- * Open Appraisal app and click on an employee's card * Activate debug mode * From the bug dropdown click on 'View Raw Record Date' or 'Data' in 18.0+ > Observation: Fil
Original PR description
[FIX] hr_appraisal: prevent TypeError for raw record data The read method in hr_appraisal.py was raising a TypeError 'NoneType object is not iterable' when the fields parameter was None. This…
[FIX] hr_appraisal: prevent TypeError for raw record data
The read method in hr_appraisal.py was raising a TypeError 'NoneType object is not iterable' when the fields parameter was None.
This occurred because the code attempted to create a set from the None value directly.
Steps to reproduce:
-------------------
* Open Appraisal app and click on an employee's card
* Activate debug mode
* From the bug dropdown click on 'View Raw Record Date' or 'Data' in 18.0+
> Observation:
File "/data/build/enterprise/hr_appraisal/models/hr_appraisal.py", line 539, in read
check_notes = set(fields) & {'note', 'assessment_note'}
^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
Why the fix:
------------
set() requires an iterable. By adding this condition, we avoid iterating over NoneType. This maintains the intended default functionality while preventing the crash.
opw-4631142
Forward-Port-Of: odoo/enterprise#82711
Forward-Port-Of: odoo/enterprise#81758Currently, an error is produced when updating payroll data if a referenced partner record in salary rules has been deleted by the user. **Steps to reproduce:** - Install the `account` and `l10n_hr_payroll` modules. - Navigate to the **Vendors** view and delete the `Register for State Labour Welfare Fund Deduction` record. - In **Scheduled Actions**, manually execute `Payroll: Update data`. - Observer the backend error. **Error:** `ValueError - ParseError('while parsing /home/odoo/src/
Original PR description
Currently, an error is produced when updating payroll data if a referenced partner record in salary rules has been deleted by the user. **Steps to reproduce:** - Install the `account` and…
Currently, an error is produced when updating payroll data if a referenced partner record in salary rules has been deleted by the user.
**Steps to reproduce:**
- Install the `account` and `l10n_hr_payroll` modules.
- Navigate to the **Vendors** view and delete the `Register for State Labour Welfare Fund Deduction` record.
- In **Scheduled Actions**, manually execute `Payroll: Update data`.
- Observer the backend error.
**Error:**
`ValueError - ParseError('while parsing /home/odoo/src/enterprise/saas-18.2/l10n_in_hr_payroll/data/salary_rules/hr_salary_rule_ind_emp_data...`
The error occurs because the method at [1] attempts to load the `hr_salary_rule_ind_emp_data.xml` file that references a deleted `partner_id` [2], leading to a parsing error.
[1] - https://github.com/odoo/enterprise/blob/46f838403c8d60760a5b37cb5fe8d052d2307999/l10n_in_hr_payroll/models/hr_payslip.py#L44-L54
[2] - https://github.com/odoo/enterprise/blob/46f838403c8d60760a5b37cb5fe8d052d2307999/l10n_in_hr_payroll/data/salary_rules/hr_salary_rule_ind_emp_data.xml#L364
This commit ensures that `res_partner_data.xml` is loaded before `hr_salary_rule_ind_emp_data.xml`, preventing errors due to missing partners.
Sentry - 6429993371
Forward-Port-Of: odoo/enterprise#81917