Browse Source

[FIX] Fix travis

pull/112/head
Invitu 8 years ago
parent
commit
b027e6df0b
  1. 8
      base_phone/fields.py

8
base_phone/fields.py

@ -121,8 +121,8 @@ def write(self, vals):
# Odoo generate a write() with the ID of the country as unicode !!! # Odoo generate a write() with the ID of the country as unicode !!!
# example : vals = {u'country_id': u'9'} # example : vals = {u'country_id': u'9'}
# So we have to convert it to an integer before browsing # So we have to convert it to an integer before browsing
if vals[u'country_id']:
vals[u'country_id'] = int(vals[u'country_id'])
if vals['country_id']:
vals['country_id'] = int(vals['country_id'])
loc_vals = convert_all_phone_fields( loc_vals = convert_all_phone_fields(
record, vals, fields_to_convert) record, vals, fields_to_convert)
original_write(record, loc_vals) original_write(record, loc_vals)
@ -140,8 +140,8 @@ def create(self, vals):
# Odoo generate a create() with the ID of the country as unicode !!! # Odoo generate a create() with the ID of the country as unicode !!!
# example : vals = {u'country_id': u'9'} # example : vals = {u'country_id': u'9'}
# So we have to convert it to an integer before browsing # So we have to convert it to an integer before browsing
if vals[u'country_id']:
vals[u'country_id'] = int(vals[u'country_id'])
if vals['country_id']:
vals['country_id'] = int(vals['country_id'])
vals = convert_all_phone_fields(self, vals, fields_to_convert) vals = convert_all_phone_fields(self, vals, fields_to_convert)
return original_create(self, vals) return original_create(self, vals)

Loading…
Cancel
Save