[FIX]res_country : fix traceback when no value is written in 'code' field when creating a new country
bzr revid: csn@openerp.com-20130131121052-5nbctbtwozamf0zw
This commit is contained in:
parent
bd2aa9bc32
commit
51eec43574
|
@ -71,7 +71,7 @@ addresses belonging to this country.\n\nYou can use the python-style string pate
|
|||
name_search = location_name_search
|
||||
|
||||
def create(self, cursor, user, vals, context=None):
|
||||
if 'code' in vals:
|
||||
if vals.get('code'):
|
||||
vals['code'] = vals['code'].upper()
|
||||
return super(Country, self).create(cursor, user, vals,
|
||||
context=context)
|
||||
|
|
Loading…
Reference in New Issue