[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) <jvm@odoo.com>
This commit is contained in:
@@ -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)
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user