From 3da7db8cb68548560a2ce9ef4a3b0694d2dd0d75 Mon Sep 17 00:00:00 2001 From: jvm-odoo Date: Wed, 26 Feb 2020 13:05:46 +0000 Subject: [PATCH] [FIX] hr: fix employee creation from user form Issue - Install Employees - Create a new user - Click on "Create employee" Traceback Cause In 999ced42989f, we add the user_id key but we already have in the action_create_employee method The key is duplicated so this is why there is a traceback Solution Remove the key in action_create_employee since we have it in _sync_user OPW-2205354 closes odoo/odoo#46375 X-original-commit: e0c29f1a4cd8d95654963b024fd0b0e1b0578776 Signed-off-by: Jason Van Malder (jvm) --- addons/hr/models/res_users.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/hr/models/res_users.py b/addons/hr/models/res_users.py index 6448676a7fd..d2190b3c3e8 100644 --- a/addons/hr/models/res_users.py +++ b/addons/hr/models/res_users.py @@ -209,7 +209,6 @@ class User(models.Model): def action_create_employee(self): self.ensure_one() self.env['hr.employee'].create(dict( - user_id=self.id, name=self.name, **self.env['hr.employee']._sync_user(self) ))