Skip to content

Commit 7ac8b00

Browse files
authored
Merge pull request #5540 from Tecnativa/17.0-ou-imp-mail_template_multi_attachment
[17.0][OU-IMP] mail_template_multi_attachment: Merge into mail
2 parents 1360408 + a69acfb commit 7ac8b00

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

openupgrade_scripts/apriori.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
# OCA/social
7777
"mail_activity_plan": "mail",
7878
"mass_mailing_custom_unsubscribe_event": "mass_mailing",
79+
"mail_template_multi_attachment": "mail",
7980
# OCA/stock-logistics-warehouse
8081
"stock_lot_filter_available": "stock",
8182
# OCA/web

openupgrade_scripts/scripts/mail/17.0.1.15/post-migration.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,24 @@ def _mail_activity_plan_template(env):
151151
)
152152

153153

154+
def _handle_mail_template_multi_attachment(env):
155+
"""OCA module mail_template_multi_attachment got its functionality implemented in
156+
core odoo.
157+
"""
158+
if openupgrade.table_exists(env.cr, "mail_template_report"):
159+
openupgrade.logged_query(
160+
env.cr,
161+
"""
162+
INSERT INTO mail_template_ir_actions_report_rel
163+
(mail_template_id, ir_actions_report_id)
164+
SELECT mtr.mail_template_id,
165+
mtr.report_template_id
166+
FROM mail_template_report mtr
167+
ON CONFLICT DO NOTHING;
168+
""",
169+
)
170+
171+
154172
@openupgrade.migrate()
155173
def migrate(env, version):
156174
openupgrade.load_data(env, "mail", "17.0.1.15/noupdate_changes.xml")
@@ -164,3 +182,4 @@ def migrate(env, version):
164182
_mail_template_convert_report_template_m2o_to_m2m(env)
165183
_fill_mail_message_outgoing(env)
166184
_mail_activity_plan_template(env)
185+
_handle_mail_template_multi_attachment(env)

0 commit comments

Comments
 (0)