Browse Source

[FIX] Check if country_id is passed before check it

pull/122/head
Christophe CHAUVET 8 years ago
parent
commit
4fdfb6db7f
  1. 2
      base_phone/base_phone.py

2
base_phone/base_phone.py

@ -53,7 +53,7 @@ class PhoneCommon(models.AbstractModel):
user = self.pool['res.users'].browse(cr, uid, uid, context=context) user = self.pool['res.users'].browse(cr, uid, uid, context=context)
# country_id on res.company is a fields.function that looks at # country_id on res.company is a fields.function that looks at
# company_id.partner_id.addres(default).country_id # company_id.partner_id.addres(default).country_id
if isinstance(vals[self._country_field], (str, unicode)):
if self._country_field in vals and isinstance(vals[self._country_field], (str, unicode)):
vals[self._country_field] = int(vals[self._country_field]) vals[self._country_field] = int(vals[self._country_field])
countrycode = None countrycode = None
if self._country_field: if self._country_field:

Loading…
Cancel
Save