From d31f3ebade00d67a1e93a055a4addefbb9c83cb2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lucas=20Lef=C3=A8vre?= <lul@odoo.com>
Date: Fri, 22 Feb 2019 10:07:35 +0000
Subject: [PATCH] [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: "Yannick Tivisse (yti)" <yti@odoo.com>
---
 addons/hr/models/hr.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/addons/hr/models/hr.py b/addons/hr/models/hr.py
index 209235ff42b2..7ce2db690716 100644
--- a/addons/hr/models/hr.py
+++ b/addons/hr/models/hr.py
@@ -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):
-- 
GitLab