<commit_before># -*- coding: utf-8 -*-
# © 2012-2016 Akretion (<NAME> <<EMAIL>>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import models, api


class HrEmployee(models.Model):
    _name = 'hr.employee'
    _inherit = ['hr.employee', 'phone.common']
    _phone_fields = ['work_phone', 'mobile_phone']
    _phone_name_sequence = 30
    _country_field = 'country_id'
    _partner_field = None

    @api.model
    def create(self, vals):
        vals_reformated = self._reformat_phonenumbers_create(vals)
        return super(HrEmployee, self).create(vals_reformated)

    @api.multi
    def write(self, vals):
        vals_reformated = self._reformat_phonenumbers_write(vals)
        return super(HrEmployee, self).write(vals_reformated)<commit_msg>Started to implement solution d) as discussed in https://github.com/OCA/connector-telephony/issues/90<commit_after># -*- coding: utf-8 -*-
# © 2012-2016 Akretion (<NAME> <<EMAIL>>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import models
from openerp.addons.base_phone.fields import Phone


class HrEmployee(models.Model):
    _inherit = 'hr.employee'
    _phone_name_sequence = 30

    work_phone = Phone(country_field='country_id')
    mobile_phone = Phone(country_field='country_id')
{'fraction_non_alphanumeric': 0.13046815042210283, 'fraction_numerical': 0.021488871834228703, 'mean_word_length': 4.015384615384615, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '470402', 'n_tokens_mistral': 473, 'n_tokens_neox': 431, 'n_words': 90}