Hi,
In model "mail.message" , I want to set the value 'Employee Only' by default True , if the Type is a comment.
So , I inherited the method create from "mail.message" I added the condition in the function , but I still having errors , what's wrong? Any help please?
class MessageExtend(models.Model):
_inherit = "mail.message"
def create(self, values_list):
tracking_values_list = []
for values in values_list:
if 'message_type' in ['comment']:
self.is_internal = True
if 'email_from' not in values: # needed to compute reply_to
author_id, email_from = self.env['mail.thread']._message_compute_author(values.get('author_id'),
email_from=None,
raise_exception=False)
values['email_from'] = email_from
.....
Thanks.