|
@ -73,11 +73,11 @@ class PhoneCommon(models.AbstractModel): |
|
|
countrycode = None |
|
|
countrycode = None |
|
|
if self._country_field and vals.get(self._country_field): |
|
|
if self._country_field and vals.get(self._country_field): |
|
|
country = self.env['res.country'].browse( |
|
|
country = self.env['res.country'].browse( |
|
|
vals[self._country_field]) |
|
|
|
|
|
|
|
|
int(vals[self._country_field])) |
|
|
countrycode = country.code |
|
|
countrycode = country.code |
|
|
elif self._partner_field and vals.get(self._partner_field): |
|
|
elif self._partner_field and vals.get(self._partner_field): |
|
|
partner = self.env['res.partner'].browse( |
|
|
partner = self.env['res.partner'].browse( |
|
|
vals[self._partner_field]) |
|
|
|
|
|
|
|
|
int(vals[self._partner_field])) |
|
|
countrycode = partner.country_id.code or False |
|
|
countrycode = partner.country_id.code or False |
|
|
return countrycode |
|
|
return countrycode |
|
|
|
|
|
|
|
|