diff options
| author | Thibault Delavallée <tde@odoo.com> | 2019-10-24 11:09:01 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-12-02 15:18:44 +0000 |
| commit | e2b33f460d0f2359e65107f8615c7e827350b4e7 (patch) | |
| tree | aacc4e64a6253dc57f3369ba5e2cc67312dfe2ea /addons/gamification | |
| parent | 06f169a0ee0f7508f861c47ee2f39467df7b6dc1 (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')
| -rw-r--r-- | addons/gamification/models/challenge.py | 8 | ||||
| -rw-r--r-- | addons/gamification/models/goal.py | 2 |
2 files changed, 5 insertions, 5 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()}) diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py index f78012d236b..80803449897 100644 --- a/addons/gamification/models/goal.py +++ b/addons/gamification/models/goal.py @@ -219,7 +219,7 @@ class Goal(models.Model): self.message_notify( body=body_html, partner_ids=[self.user_id.partner_id.id], - subtype='mail.mt_comment', + subtype_xmlid='mail.mt_comment', email_layout_xmlid='mail.mail_notification_light', ) |
