From 9a9dcb3a64fcb01118123e0c832f4eabfc25b1fe Mon Sep 17 00:00:00 2001 From: steveferry Date: Tue, 2 Jun 2015 11:44:46 +0200 Subject: [PATCH] Add a condition --- partner_firstname/res_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partner_firstname/res_user.py b/partner_firstname/res_user.py index 100381dfc..490bc16ca 100644 --- a/partner_firstname/res_user.py +++ b/partner_firstname/res_user.py @@ -41,7 +41,7 @@ class ResUsers(orm.Model): if 'name' in vals: vals2['lastname'] = vals2['name'] - elif partner.lastname: + elif partner.lastname and 'lastname' not in vals: vals2['lastname'] = partner.lastname elif 'login' in vals and 'lastname' not in vals: vals2['lastname'] = vals2['login']