diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py index 6ed4e76fa78..63fcf967630 100644 --- a/openerp/addons/base/res/res_country.py +++ b/openerp/addons/base/res/res_country.py @@ -77,7 +77,7 @@ addresses belonging to this country.\n\nYou can use the python-style string pate context=context) def write(self, cursor, user, ids, vals, context=None): - if 'code' in vals: + if vals.get('code', False): vals['code'] = vals['code'].upper() return super(Country, self).write(cursor, user, ids, vals, context=context)