[FIX]not check value in dict.

bzr revid: vme@tinyerp.com-20121214071823-1ddtkev3jj2l3cq3
This commit is contained in:
Vidhin Mehta (OpenERP) 2012-12-14 12:48:23 +05:30
parent 1565e8c708
commit 3cdad18c64
1 changed files with 2 additions and 2 deletions

View File

@ -71,13 +71,13 @@ 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)
def write(self, cursor, user, ids, vals, context=None):
if 'code' in vals:
if vals.get('code'):
vals['code'] = vals['code'].upper()
return super(Country, self).write(cursor, user, ids, vals,
context=context)