Thursday, February 27, 2025
8 changes · 17.0
Resolved issues and error corrections
This fixes an automated test in the website editor so it works reliably with Chrome 133 and earlier versions. It helps maintain confidence that editor banner behavior continues to be checked correctly without affecting everyday user features.
Original PR description
The sequence of events leads to slightly different results in Chrome 133 which results in the test failing. This commit changes the sequence of events so that the test passes in Chrome 133 as well as the prior versions.
Event registration forms now ignore unexpected extra form fields instead of failing when their values do not match the attendee field format. This helps visitors complete registrations reliably even when custom form details are present.
Original PR description
When registration form have extra form details where the field value doesn't match an attendee field format (2 or 3 values separated by a dash) we where crashing while trying to unpack the split value. This commit simply ignore the field if its value doesn't match the expected format of an attendee field. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Receipts for account settlements and other non-editable orders will no longer show the prompt to start adding products when there are no order lines. This prevents confusing messaging for cashiers and customers when viewing finalized or receipt-only order information.
Original PR description
Issue: When settling user account, the order will not have any order lines, that will display a misleading empty state on the receipt, saying: "Start adding products". Fix: We do not display this empty state, when the order is not editable, which is the case of, but not only, settling an account. Note that we have another related PR https://github.com/odoo/enterprise/pull/76370 for the same ticket, which fixes only the case of settling an account. However, @adgu-odoo suggested to make the fix more general, to fix the case of not only settling an account, but also other possible cases where we show the OrderWidget in a receipt. If this PR is merged, the other one should be closed, and vice versa. opw-4430325
This fix prevents errors when website page templates are regenerated after some related snippets have been archived. It ensures archived template records are still recognized, avoiding duplicate creation failures during website setup or upgrades.
Original PR description
- While calling `_generate_primary_snippet_templates`, `create_missing_views` fetches the existing snippet views. However, archived snippet is ignored, causing `create_missing_views` to attempt to create the snippet again, mistakenly considering it as a missing view. This leads to a traceback:
```py
File "/data/build/odoo/odoo/sql_db.py", line 332, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "ir_model_data_module_name_uniq_index"
DETAIL: Key (module, name)=(website, new_page_template_services_0_s_website_form) already exists.
```
- To prevent such errors, it's better to fetch inactive views as well during creation.
opw-4510585
upg-2452055
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prFixes a display issue in the online shop cart where suggested rental accessories could appear with a broken layout when they had rental pricing periods. This helps customers view add-on rental products correctly during checkout, reducing confusion and improving the shopping experience.
Original PR description
Steps to reproduce:
1) Configure 2 rental products (product1 and product2)
2) Add at least 1 pricing period to product2
3) Set product2 as accessory product to product1
4) Go to /shop page and add product1
5) Go to the cart and observe the broken layout of suggested
accessories
opw-4463981Fixes an issue where payroll work hour calculations could fail when processing multiple employee contracts at once. This helps payroll operations run reliably for contract groups that share timezone settings.
Original PR description
This PR fixes the bug that I introduced in this PR: https://github.com/odoo/enterprise/pull/78880 The bug involves the timezone-getting code in `HrContract._get_work_hours()`. When I tried to fix the bug addressed in the linked PR, I failed to account for the fact that `_get_work_hours()` can be called on sets of contracts with size greater than 1. We're still guaranteed the uniqueness of timezones, but singleton errors were being raised by my original fix if the contract set this method was called on had more than one calendar. The `assert` statement added to this method is enough to ensure this bug won't appear again.
Odoo Studio now handles numeric values used for yes/no field options without crashing. This makes editing affected fields in debug mode more reliable for administrators and implementers.
Original PR description
Have a field in a view like this
```<field name="" options="{ some_boolean: 1 }" />```
And have the corresponding supportedOption (defined on the field widget):
```{
somme_boolean: {
type: "boolean"
}
}```
Open studio and click on that field, in debug mode.
Before this commit, there was a crash because 1 or 0 were directly passed to a component which expected a boolean value. After this commit, before displaying the options we convert 0 or 1 to the corresponding boolean.This update adds checks to ensure receipts for customer account settlements do not show the misleading “Start adding products” empty message. It helps keep the point-of-sale experience clearer for staff when processing due payments without a regular order.
Original PR description
When settling the user account from `pos_settle_due`, we show a receipt with no order (as expected), but with an empty state saying "Start adding products"! This bug has been reported while using the `pos_settle_due` module, however, the fix has been made generic and hence been implemented in the `point_of_sale` module. This PR just adds the test specific to `pos_settle_due`. opw-4430325