Skip to content

Commit 652d65a

Browse files
committed
[FIX] util.move_model: add version check for email.template
In [this](odoo/upgrade#4570 (comment)) PR, the [email_template update line](https://github.com/odoo/upgrade-util/blob/f97b7a28ef62fe4a7b0417854a904d132adc9882/src/util/modules.py#L1271) was preventing people from creating an `email.template` custom model even though it is not used in standard since version 8. Related issues : - [PR-specific](odoo/upgrade-specific#20818) - [OPW-6055415](https://www.odoo.com/odoo/project/70/tasks/6055415)
1 parent f97b7a2 commit 652d65a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/util/modules.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,8 +1268,10 @@ def update_imd(data_model, path):
12681268
update_imd("ir.actions.act_window", path="res_model")
12691269
update_imd("ir.actions.server", path="model_id.model")
12701270
update_imd("ir.actions.report", path="model")
1271-
update_imd("email.template", path="model") # OpenERP <= 8.0
1272-
update_imd("mail.template", path="model")
1271+
if version_gte("9.0"):
1272+
update_imd("mail.template", path="model")
1273+
else:
1274+
update_imd("email.template", path="model")
12731275
if column_exists(cr, "ir_cron", "model"):
12741276
# < 10.saas~14
12751277
update_imd("ir.cron", path="model")

0 commit comments

Comments
 (0)