Wednesday, April 30, 2025
4 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-prCreating 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