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 9 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 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

Loading…
Cancel
Save