Browse Source

Merge pull request #2 from invitu/9.0-migrate-base_phone

[FIX] Fix problem in point_of_sale with customer editing
pull/83/head
Sebastien LANGE 8 years ago
parent
commit
4d31e6ea55
  1. 4
      base_phone/base_phone.py

4
base_phone/base_phone.py

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

Loading…
Cancel
Save