diff --git a/base_phone/models/__init__.py b/base_phone/models/__init__.py index e4ebd1ea5..0252a7d0d 100644 --- a/base_phone/models/__init__.py +++ b/base_phone/models/__init__.py @@ -4,3 +4,4 @@ from . import res_company from . import res_partner from . import phone_common +from . import ir_fields_converter diff --git a/base_phone/models/ir_fields_converter.py b/base_phone/models/ir_fields_converter.py new file mode 100644 index 000000000..0a350adf0 --- /dev/null +++ b/base_phone/models/ir_fields_converter.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# © 2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models, api + + +class IrFieldsConverter(models.AbstractModel): + _inherit = 'ir.fields.converter' + + @api.model + def _str_to_phone(self, model, field, value): + return super(IrFieldsConverter, self)._str_to_char(model, field, value) + + @api.model + def _str_to_fax(self, model, field, value): + return super(IrFieldsConverter, self)._str_to_char(model, field, value)