summaryrefslogtreecommitdiff
path: root/addons/gamification/models/challenge.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-10-24 11:09:01 +0000
committerThibault Delavallée <tde@odoo.com>2019-12-02 15:18:44 +0000
commite2b33f460d0f2359e65107f8615c7e827350b4e7 (patch)
treeaacc4e64a6253dc57f3369ba5e2cc67312dfe2ea /addons/gamification/models/challenge.py
parent06f169a0ee0f7508f861c47ee2f39467df7b6dc1 (diff)
[REF] mail, various: rename subtype parameter of message_post to subtype_xmlid
PURPOSE Clean posting process and improve mail.message definition and comprehension. SPECIFICATIONS In order to be more explicit subtype parameter is renamed to subtype_xmlid. It therefore clearly indicates it should be a valid subtype Xml ID. Support of ill formatted Xml IDs is removed because there is no reason to try to add some random prefix. Give something that exists or go to hell, punk ! LINKS Task ID 2071556 PR #38692
Diffstat (limited to 'addons/gamification/models/challenge.py')
-rw-r--r--addons/gamification/models/challenge.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py
index 868e46d1fdf..50254967205 100644
--- a/addons/gamification/models/challenge.py
+++ b/addons/gamification/models/challenge.py
@@ -562,13 +562,13 @@ class Challenge(models.Model):
challenge.message_post(
body=body_html,
partner_ids=challenge.mapped('user_ids.partner_id.id'),
- subtype='mail.mt_comment',
+ subtype_xmlid='mail.mt_comment',
email_layout_xmlid='mail.mail_notification_light',
)
if challenge.report_message_group_id:
challenge.report_message_group_id.message_post(
body=body_html,
- subtype='mail.mt_comment')
+ subtype_xmlid='mail.mt_comment')
else:
# generate individual reports
@@ -586,13 +586,13 @@ class Challenge(models.Model):
challenge.message_notify(
body=body_html,
partner_ids=[user.partner_id.id],
- subtype='mail.mt_comment',
+ subtype_xmlid='mail.mt_comment',
email_layout_xmlid='mail.mail_notification_light',
)
if challenge.report_message_group_id:
challenge.report_message_group_id.message_post(
body=body_html,
- subtype='mail.mt_comment',
+ subtype_xmlid='mail.mt_comment',
email_layout_xmlid='mail.mail_notification_light',
)
return challenge.write({'last_report_date': fields.Date.today()})