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/calendar/models | |
| 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/calendar/models')
| -rw-r--r-- | addons/calendar/models/calendar.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/calendar/models/calendar.py b/addons/calendar/models/calendar.py index 98f25ab908a..97e131702ae 100644 --- a/addons/calendar/models/calendar.py +++ b/addons/calendar/models/calendar.py @@ -226,7 +226,7 @@ class Attendee(models.Model): result = self.write({'state': 'accepted'}) for attendee in self: if attendee.event_id: - attendee.event_id.message_post(body=_("%s has accepted invitation") % (attendee.common_name), subtype="calendar.subtype_invitation") + attendee.event_id.message_post(body=_("%s has accepted invitation") % (attendee.common_name), subtype_xmlid="calendar.subtype_invitation") return result def do_decline(self): @@ -234,7 +234,7 @@ class Attendee(models.Model): res = self.write({'state': 'declined'}) for attendee in self: if attendee.event_id: - attendee.event_id.message_post(body=_("%s has declined invitation") % (attendee.common_name), subtype="calendar.subtype_invitation") + attendee.event_id.message_post(body=_("%s has declined invitation") % (attendee.common_name), subtype_xmlid="calendar.subtype_invitation") return res |
