diff --git a/addons/mail/models/mail_message_subtype.py b/addons/mail/models/mail_message_subtype.py index 4ad44ccfbb069fdd43881f32ad50bfb641308466..f0bc054bd5e7b6c146b046e5ccd3adead72c905e 100644 --- a/addons/mail/models/mail_message_subtype.py +++ b/addons/mail/models/mail_message_subtype.py @@ -46,14 +46,17 @@ class MailMessageSubtype(models.Model): self.clear_caches() return super(MailMessageSubtype, self).create(vals) + @api.multi def write(self, vals): self.clear_caches() return super(MailMessageSubtype, self).write(vals) + @api.multi def unlink(self): self.clear_caches() return super(MailMessageSubtype, self).unlink() + @api.model def auto_subscribe_subtypes(self, model_name): """ Retrieve the header subtypes and relations for the given model. """ subtype_ids, relations = self._auto_subscribe_subtypes(model_name) @@ -65,6 +68,7 @@ class MailMessageSubtype(models.Model): subtypes = self.search(domain) return subtypes.ids, set(subtype.relation_field for subtype in subtypes if subtype.relation_field) + @api.model def default_subtypes(self, model_name): """ Retrieve the default subtypes (all, internal, external) for the given model. """ subtype_ids, internal_ids, external_ids = self._default_subtypes(model_name)