Browse Source

[FIX] Fix problem in point_of_sale with customer editing

pull/83/head^2
Invitu 9 years ago
parent
commit
7e75fc0674
  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