Browse Source

Merge pull request #62 from akretion/8.0_fix_reformat_number

[FIX] set countrycode in upper case to avoid error with the lib phonenumbers
pull/63/head
Alexis de Lattre 9 years ago
parent
commit
46f89ce453
  1. 2
      base_phone/base_phone.py

2
base_phone/base_phone.py

@ -90,7 +90,7 @@ class PhoneCommon(models.AbstractModel):
init_value = vals.get(field)
try:
res_parse = phonenumbers.parse(
vals.get(field), countrycode)
vals.get(field), countrycode.upper())
vals[field] = phonenumbers.format_number(
res_parse, phonenumbers.PhoneNumberFormat.E164)
if init_value != vals[field]:

Loading…
Cancel
Save