Skip to content
Snippets Groups Projects
Commit d31f3eba authored by Lucas Lefèvre's avatar Lucas Lefèvre
Browse files

[FIX] hr: Fix wrong super call


super.message_post in _message_log is wrong.

Also use `*args` and `**kwargs` in method parameters

closes odoo/odoo#31354

Signed-off-by: default avatar"Yannick Tivisse (yti)" <yti@odoo.com>
parent a8e95217
No related branches found
No related tags found
No related merge requests found
......@@ -360,13 +360,13 @@ class Employee(models.Model):
self = self.sudo(real_user)
return self
def _message_log(self, body='', subject=False, message_type='notification', **kwargs):
return super(Employee, self._post_author()).message_post(body=body, subject=subject, message_type=message_type, **kwargs)
def _message_log(self, *args, **kwargs):
return super(Employee, self._post_author())._message_log(*args, **kwargs)
@api.multi
@api.returns('mail.message', lambda value: value.id)
def message_post(self, **kwargs):
return super(Employee, self._post_author()).message_post(**kwargs)
def message_post(self, *args, **kwargs):
return super(Employee, self._post_author()).message_post(*args, **kwargs)
class Department(models.Model):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment