From 3cdad18c64be6081c03dbee76b1452dfb543a140 Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 14 Dec 2012 12:48:23 +0530 Subject: [PATCH] [FIX]not check value in dict. bzr revid: vme@tinyerp.com-20121214071823-1ddtkev3jj2l3cq3 --- openerp/addons/base/res/res_country.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py index 98a3b769a11..4bbfcccb191 100644 --- a/openerp/addons/base/res/res_country.py +++ b/openerp/addons/base/res/res_country.py @@ -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)