Daily updates from Odoo
Wednesday, April 30, 2025
6 changes · saas-18.2
Resolved issues and error corrections
Fixes an error that occurred when previewing the Calendar Attendee Information email template. Users can now preview this template normally, avoiding a disruptive traceback during email template setup or review.
Original PR description
When a user previews the mail template for Calendar Attendee Information,
A traceback will appear.
Steps to reproduce the error:
- Install ``calendar``
- Now go to Email Templates >
Open email template (Applies to: ``Calendar Attendee Information``)
- Click Preview
Traceback:
```
File "/home/odoo/src/odoo/saas-18.2/addons/mail/models/models.py", line 300, in _message_get_default_recipients
all_emails += defaults['partners'].mapped('email_normalized')
KeyError: 'partners'
```
https://github.com/odoo/odoo/blob/09099ab477bd871c67205388d96172280cd714a5/addons/mail/models/models.py#L300 Here, ``partners`` key is accessed but at [1] key is ``partner_ids``,
So, it will lead to the above traceback.
1-https://github.com/odoo/odoo/blob/09099ab477bd871c67205388d96172280cd714a5/addons/calendar/models/calendar_attendee.py#L116
sentry-6505820998
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix prevents Point of Sale restaurant orders from failing when they are created and paid while offline, then reloaded after reconnecting. It improves reliability for staff using POS in unstable network conditions by correctly handling saved order identifiers.
Original PR description
This error occurs when creating an `order` and `validating payment` in offline mode then reloading the same order. Steps to reproduce: - Install module `pos_restaurant`. - Open `POS Restaurant`. -…
This error occurs when creating an `order` and `validating payment` in offline mode then reloading the same order. Steps to reproduce: - Install module `pos_restaurant`. - Open `POS Restaurant`. - Add some products to the order go to Payments, and select card(Pick any table) - Open Inspect, go to the Network tab and enable Offline Mode. - Click Validate, go to `Orders`, and click `Load Order`. - Add Products to the `Orders` and click on Order. - In the Network tab, enable No Throttling and click on Orders again. - Do the above step one more time on the same table. ValueError Expected singleton: pos.order() This error occurs due to the `missing handling ID` as a string like in saas18.1 at [1], so when the fieldName is a string the type system is unable to fetch the ID This commit resolves the error by ensuring that the ID is correctly processed. If it is a number, it remains unchanged. If it is a string containing an underscore (_), the numeric part after _ is extracted. Link [1] :https://github.com/odoo/odoo/blob/d4e40e4be4233d91db80717891cef73c4fdec06c/addons/point_of_sale/static/src/app/models/related_models.js#L281-L285 Sentry - 6365371665 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Spanish companies will now always show the business customer fields needed during checkout and address editing. This prevents customers from getting blocked by a required VAT field that was hidden by website settings.
Original PR description
Versions -------- - saas-18.2+ Steps ----- 1. Enable Spanish localization; 2. assign website to Spanish company; 3. disable B2B fields in checkout via website editor; 4. edit address in eCommerce as a Spanish customer. Issue ----- Impossible to proceed, as VAT is a required field, but isn't displayed. Cause ----- Commit 26df8d31ab94 fixed this issue in earlier versions, but wasn't adapted for changes in 18.2+ where 5a93da8e9220 refactored address management. Solution -------- Override `_prepare_address_form_values` to always render B2B fields when the current company is Spanish. opw-4708230
Creating a new attendee from the eLearning reporting views no longer triggers an error when the new record has not been saved yet. This improves reliability for users managing course attendance and prevents an avoidable interruption in the workflow.
Original PR description
Currently, this exception is raised when a user tries to create a new attendee. Steps to Reproduce: 1. Install `website_slides` module. 2. Go to eLearning ->Reporting -> Attendees 3. Switch to the Pivot view and click on a count integer. 4. Open the List View and click the "New" button. 5. An error Occurs Error: ```SyntaxError syntax error at or near ")" LINE 18: WHERE SCP.id IN () ``` This issue[1] occurs because the system runs a query expecting an existing record with an ID, but since the record isn't saved yet, `self.ids` is empty, causing the query to fail. [1]- https://github.com/odoo/odoo/blob/fbee52705e0332f7134eb5505eac26677e38c168/addons/website_slides/models/slide_channel.py#L91 This fix ensures that if self.ids is empty, the system stops the process early and sets a proper value, preventing the query from failing. sentry-6465821899 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed an issue where automated actions creating activities could fail when a record had more than one user in a multi-user field. The system now creates the activity for the first user found, avoiding an error that blocked the action.
Original PR description
Have a server action that creates an activity based on a record's x2m user field. Run that action on a record that has more than one user in this field. Before this commit: display traceback "ValueError: Expected singleton" After this commit: the activity is created for the first user found in the x2m field value. Task id: opw-4745032
This fixes an internal test so it skips folders and items that are not meant to be imported as Python code. It helps developers run checks locally without false failures, improving confidence in routine maintenance.
Original PR description
The test was failing locally due to attempts to import non-Python modules like `.tx`, `.git`, and `odoo.setup`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr