Sunday, November 2, 2025
2 changes · master
Resolved issues and error corrections
Fixed an issue in Email Marketing where contacts added to a mailing list through the bulk wizard did not show a subscription date. This ensures mailing list records are created consistently, giving users complete and reliable contact history.
Original PR description
Steps to reproduce: ------------------------- 1. Install Email Marketing Module 2. Create a new Mail List 3. Go to Mailing List Contacts 4. Select multiple contacts from list and click on Add to List…
Steps to reproduce: ------------------------- 1. Install Email Marketing Module 2. Create a new Mail List 3. Go to Mailing List Contacts 4. Select multiple contacts from list and click on Add to List button 5. From wizard select the newly created list and click on Add button 6. Open one of the contact added in step 4 Observation: ------------------------- In the Mailing Lists tab of the contact, the newly added list does not show a Subscription Date. However, if we add the same through Add a line, the subscription date is shown correctly. Issue: ------------------------- When adding contacts to a mailing list through the wizard, the code https://github.com/odoo/odoo/blob/1e6ba783fcd898875dadb47924147688685707cf/addons/mass_mailing/wizard/mailing_contact_to_list.py#L34-L39 adds the contact using a direct database operation. This bypasses the ORM record creation for `mailing.subscription`, so the `create_date` (subscription date) is never set. Solution: ------------------------- Use `Command.create` on the `subscription_ids` field to properly create the `mailing.subscription` records and ensure the Subscription Date is set. opw-5055372 Forward-Port-Of: odoo/odoo#230284
This fix stabilizes an internal automated test for the enterprise Discuss AI composer by ensuring the required employee data model is available during the test. It helps prevent intermittent build failures, improving confidence in releases without changing user-facing behavior.
Original PR description
HOOT test "can handle command and disable mentions in AI composer" fails non-deterministically on runbot with the following error: ``` Cannot find a definition for model "hr.employee": could not get…
HOOT test "can handle command and disable mentions in AI composer" fails non-deterministically on runbot with the following error: ``` Cannot find a definition for model "hr.employee": could not get model from server environment (did you forget to use `defineModels()?`) ``` Somehow this test requires `hr.employee` model, which explained why it had `defineHrModels()`. This was replaced to enterprise livechat models, since new test need livechat and `hrModels` lacked livechat. The way to `defineModels()` on modules with lots of dependency sucks: `hr` and `im_livechat` and `ai` have no explicit dependency among each other, but a module such as `test_discuss_full_enterprise` has to combine all of their behaviors and definitions. `defineModels()` is designed to extend a model by makin a subclass of a definition of same model in a dependent module, which is not practical here. This commit doesn't solve the problem of defining livechat and hr models in the `test_discuss_full_enterprise` test suites, but for the quick and immediate fix it moves the problematic AI test in its own suite with `defineHrModels()`. Fixes https://runbot.odoo.com/runbot/build/92414152 Forward-Port-Of: odoo/enterprise#98642