From 115ff5f834e48408b2fff0ecabf2d26b76ef6c7e Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Wed, 20 Feb 2013 15:00:17 +0100 Subject: [PATCH] [IMP] partner_firstname - less steps in partner vals(e) --- 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 8bb093414..d1d3a78e4 100644 --- a/partner_firstname/res_user.py +++ b/partner_firstname/res_user.py @@ -27,6 +27,6 @@ class ResUsers(orm.Model): _inherit = 'res.users' def create(self, cursor, uid, vals, context=None): - if not 'name' in vals or not vals['name']: + if not vals.get('name'): vals['name'] = vals['login'] return super(ResUsers, self).create(cursor, uid, vals, context=context)