Skip to content

[FIX] util.move_model: modify email_template only if model column exists#398

Closed
MrRose765 wants to merge 1 commit intoodoo:masterfrom
odoo-dev:master-fix_move_model_mail_template-cymo
Closed

[FIX] util.move_model: modify email_template only if model column exists#398
MrRose765 wants to merge 1 commit intoodoo:masterfrom
odoo-dev:master-fix_move_model_mail_template-cymo

Conversation

@MrRose765
Copy link
Copy Markdown
Contributor

@MrRose765 MrRose765 commented Mar 26, 2026

In move_model, we were always updating the email.template model,
even if the model is replaced by mail.template since OpenERP 9.0.
The problem is that it prevents users from creating a custom email.template model
even if it is not used in standard since version 8.0.

Related issue :

@robodoo
Copy link
Copy Markdown
Contributor

robodoo commented Mar 26, 2026

Pull request status dashboard

@aj-fuentes aj-fuentes requested a review from KangOl March 26, 2026 14:48
@MrRose765 MrRose765 force-pushed the master-fix_move_model_mail_template-cymo branch from 652d65a to f7fa7cd Compare March 26, 2026 15:46
@KangOl
Copy link
Copy Markdown
Contributor

KangOl commented Mar 26, 2026

upgradeci retry with always only mail in all versions

@KangOl
Copy link
Copy Markdown
Contributor

KangOl commented Mar 26, 2026

upgradeci retry with always only account crm im_chat in 9.0 master

@MrRose765
Copy link
Copy Markdown
Contributor Author

@KangOl CI fail does not seem related. Does it look good to merge ? :)

@MrRose765 MrRose765 force-pushed the master-fix_move_model_mail_template-cymo branch from f7fa7cd to fc5b908 Compare April 10, 2026 13:09
@MrRose765 MrRose765 changed the title [FIX] util.move_model: add version check for email.template [FIX] util.move_model: modify email_template only if model column exists Apr 10, 2026
In [move_model], we were always updating the `email.template` model,
even if the model is replaced by `mail.template` since OpenERP 9.0.
The problem is that it prevents users from creating a custom `email.template` model
even if it is not used in standard since version 8.0.

Related issue :
- [PR-specific](odoo/upgrade-specific#20818)

[move_model]: https://github.com/odoo/upgrade-util/blob/f97b7a28ef62fe4a7b0417854a904d132adc9882/src/util/modules.py#L1271
@MrRose765 MrRose765 force-pushed the master-fix_move_model_mail_template-cymo branch from fc5b908 to e610ab5 Compare April 10, 2026 13:21
@MrRose765 MrRose765 requested a review from KangOl April 10, 2026 13:21
Copy link
Copy Markdown
Contributor

@KangOl KangOl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants