Selaa lähdekoodia

commit inicial

Rodney Enciso Arias 8 vuotta sitten
commit
a7a1940519

+ 25 - 0
__init__.py

@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Base Phone module for OpenERP
+#    Copyright (C) 2014 Alexis de Lattre <alexis@via.ecp.fr>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from . import base_phone
+from . import wizard
+from . import report_sxw_format
+from . import controller

BIN
__init__.pyc


+ 82 - 0
__openerp__.py

@@ -0,0 +1,82 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Base Phone module for OpenERP
+#    Copyright (C) 2014 Alexis de Lattre <alexis@via.ecp.fr>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+
+{
+    'name': 'Base Phone',
+    'version': '8.0.0.1.0',
+    'category': 'Phone',
+    'license': 'AGPL-3',
+    'summary': 'Validate phone numbers',
+    'description': """
+Base Phone
+==========
+
+This module validate phone numbers using the *phonenumbers* Python library,
+which is a port of the library used in Android smartphones. For example, if
+your user is linked to a French company and you update the form view of a
+partner with a badly written French phone number such as '01-55-42-12-42',
+Odoo will automatically update the phone number to E.164 format '+33155421242'
+and display in the form and tree view of the partner the readable equivalent
+'+33 1 55 42 12 42'.
+
+This module also adds *tel:* links on phone numbers and *fax:* links on fax
+numbers. If you have a softphone or a client software on your PC that is
+associated with *tel:* links, the softphone should propose you to dial the
+phone number when you click on such a link.
+
+This module also updates the format() function for reports and adds 2
+arguments :
+
+* *phone* : should be True for a phone number, False (default) otherwize.
+* *phone_format* : it can have 3 possible values :
+    * *international* (default) : the report will display '+33 1 55 42 12 42'
+    * *national* : the report will display '01 55 42 12 42'
+    * *e164* : the report will display '+33155421242'
+
+For example, in the Sale Order report, to display the phone number of the
+Salesman, you can write :  o.user_id and o.user_id.phone and
+format(o.user_id.phone, phone=True, phone_format='national') or ''
+
+This module is independant from the Asterisk connector.
+
+Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com>
+for any help or question about this module.
+""",
+    'author': "Akretion,Odoo Community Association (OCA)",
+    'website': 'http://www.akretion.com/',
+    'depends': ['base', 'web'],
+    'external_dependencies': {'python': ['phonenumbers']},
+    'data': [
+        'security/phone_security.xml',
+        'security/ir.model.access.csv',
+        'res_partner_view.xml',
+        'res_company_view.xml',
+        'res_users_view.xml',
+        'wizard/reformat_all_phonenumbers_view.xml',
+        'wizard/number_not_found_view.xml',
+        'web_phone.xml',
+        ],
+    'qweb': ['static/src/xml/*.xml'],
+    'test': ['test/phonenum.yml'],
+    'images': [],
+    'installable': True,
+}

+ 304 - 0
base_phone.py

@@ -0,0 +1,304 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Base Phone module for Odoo/OpenERP
+#    Copyright (C) 2010-2014 Alexis de Lattre <alexis@via.ecp.fr>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp import models, fields, api, _
+from openerp.tools.safe_eval import safe_eval
+from openerp.exceptions import Warning
+import logging
+# Lib for phone number reformating -> pip install phonenumbers
+import phonenumbers
+
+_logger = logging.getLogger(__name__)
+
+
+class PhoneCommon(models.AbstractModel):
+    _name = 'phone.common'
+
+    def _generic_reformat_phonenumbers(
+            self, cr, uid, ids, vals, context=None):
+        """Reformat phone numbers in E.164 format i.e. +33141981242"""
+        assert isinstance(self._country_field, (str, unicode, type(None))),\
+            'Wrong self._country_field'
+        assert isinstance(self._partner_field, (str, unicode, type(None))),\
+            'Wrong self._partner_field'
+        assert isinstance(self._phone_fields, list),\
+            'self._phone_fields must be a list'
+        if context is None:
+            context = {}
+        if ids and isinstance(ids, (int, long)):
+            ids = [ids]
+        if any([vals.get(field) for field in self._phone_fields]):
+            user = self.pool['res.users'].browse(cr, uid, uid, context=context)
+            # country_id on res.company is a fields.function that looks at
+            # company_id.partner_id.addres(default).country_id
+            countrycode = None
+            if self._country_field:
+                if vals.get(self._country_field):
+                    country = self.pool['res.country'].browse(
+                        cr, uid, vals[self._country_field], context=context)
+                    countrycode = country.code
+                elif ids:
+                    rec = self.browse(cr, uid, ids[0], context=context)
+                    country = safe_eval(
+                        'rec.' + self._country_field, {'rec': rec})
+                    countrycode = country and country.code or None
+            elif self._partner_field:
+                if vals.get(self._partner_field):
+                    partner = self.pool['res.partner'].browse(
+                        cr, uid, vals[self._partner_field], context=context)
+                    countrycode = partner.country_id and\
+                        partner.country_id.code or None
+                elif ids:
+                    rec = self.browse(cr, uid, ids[0], context=context)
+                    partner = safe_eval(
+                        'rec.' + self._partner_field, {'rec': rec})
+                    if partner:
+                        countrycode = partner.country_id and\
+                            partner.country_id.code or None
+            if not countrycode:
+                if user.company_id.country_id:
+                    countrycode = user.company_id.country_id.code
+                else:
+                    _logger.warning(
+                        "You should set a country on the company '%s' "
+                        "to allow the reformat of phone numbers",
+                        user.company_id.name)
+                    countrycode = None
+            if countrycode:
+                countrycode = countrycode.upper()
+                # with country code = None, phonenumbers.parse() will work
+                # with phonenumbers formatted in E164, but will fail with
+                # phone numbers in national format
+            for field in self._phone_fields:
+                if vals.get(field):
+                    init_value = vals.get(field)
+                    try:
+                        res_parse = phonenumbers.parse(
+                            vals.get(field), countrycode)
+                        vals[field] = phonenumbers.format_number(
+                            res_parse, phonenumbers.PhoneNumberFormat.E164)
+                        if init_value != vals[field]:
+                            _logger.debug(
+                                "%s initial value: '%s' updated value: '%s'",
+                                field, init_value, vals[field])
+                    except Exception, e:
+                        # I do BOTH logger and raise, because:
+                        # raise is usefull when the record is created/written
+                        #    by a user via the Web interface
+                        # logger is usefull when the record is created/written
+                        #    via the webservices
+                        _logger.error(
+                            "Cannot reformat the phone number '%s' to "
+                            "international format with region=%s"
+                            % (vals.get(field), countrycode))
+                        if context.get('raise_if_phone_parse_fails'):
+                            raise Warning(
+                                _("Cannot reformat the phone number '%s' to "
+                                    "international format. Error message: %s")
+                                % (vals.get(field), e))
+        return vals
+
+    @api.model
+    def get_name_from_phone_number(self, presented_number):
+        '''Function to get name from phone number. Usefull for use from IPBX
+        to add CallerID name to incoming calls.'''
+        res = self.get_record_from_phone_number(presented_number)
+        if res:
+            return res[2]
+        else:
+            return False
+
+    @api.model
+    def get_record_from_phone_number(self, presented_number):
+        '''If it finds something, it returns (object name, ID, record name)
+        For example : ('res.partner', 42, u'Alexis de Lattre (Akretion)')
+        '''
+        _logger.debug(
+            u"Call get_name_from_phone_number with number = %s"
+            % presented_number)
+        if not isinstance(presented_number, (str, unicode)):
+            _logger.warning(
+                u"Number '%s' should be a 'str' or 'unicode' but it is a '%s'"
+                % (presented_number, type(presented_number)))
+            return False
+        if not presented_number.isdigit():
+            _logger.warning(
+                u"Number '%s' should only contain digits." % presented_number)
+
+        nr_digits_to_match_from_end = \
+            self.env.user.company_id.number_of_digits_to_match_from_end
+        if len(presented_number) >= nr_digits_to_match_from_end:
+            end_number_to_match = presented_number[
+                -nr_digits_to_match_from_end:len(presented_number)]
+        else:
+            end_number_to_match = presented_number
+
+        phoneobjects = self._get_phone_fields()
+        phonefieldslist = []  # [('res.parter', 10), ('crm.lead', 20)]
+        for objname in phoneobjects:
+            if (
+                    '_phone_name_sequence' in dir(self.env[objname]) and
+                    self.env[objname]._phone_name_sequence):
+                phonefieldslist.append(
+                    (objname, self.env[objname]._phone_name_sequence))
+        phonefieldslist_sorted = sorted(
+            phonefieldslist,
+            key=lambda element: element[1])
+        _logger.debug('phonefieldslist_sorted=%s' % phonefieldslist_sorted)
+        for (objname, prio) in phonefieldslist_sorted:
+            obj = self.with_context(callerid=True).env[objname]
+            pg_search_number = str('%' + end_number_to_match)
+            _logger.debug(
+                "Will search phone and mobile numbers in %s ending with '%s'"
+                % (objname, end_number_to_match))
+            domain = []
+            for phonefield in obj._phone_fields:
+                domain.append((phonefield, '=like', pg_search_number))
+            if len(obj._phone_fields) > 1:
+                domain = ['|'] * (len(obj._phone_fields) - 1) + domain
+            res_obj = obj.search(domain)
+            if len(res_obj) > 1:
+                _logger.warning(
+                    u"There are several %s (IDS = %s) with a phone number "
+                    "ending with '%s'. Taking the first one."
+                    % (objname, res_obj.ids, end_number_to_match))
+                res_obj = res_obj[0]
+            if res_obj:
+                name = res_obj.name_get()[0][1]
+                res = (objname, res_obj.id, name)
+                _logger.debug(
+                    u"Answer get_record_from_phone_number: (%s, %d, %s)"
+                    % (res[0], res[1], res[2]))
+                return res
+            else:
+                _logger.debug(
+                    u"No match on %s for end of phone number '%s'"
+                    % (objname, end_number_to_match))
+        return False
+
+    @api.model
+    def _get_phone_fields(self):
+        '''Returns a dict with key = object name
+        and value = list of phone fields'''
+        models = self.env['ir.model'].search([('osv_memory', '=', False)])
+        res = []
+        for model in models:
+            senv = False
+            try:
+                senv = self.env[model.model]
+            except:
+                continue
+            if (
+                    '_phone_fields' in dir(senv) and
+                    isinstance(senv._phone_fields, list)):
+                res.append(model.model)
+        return res
+
+    def click2dial(self, cr, uid, erp_number, context=None):
+        '''This function is designed to be overridden in IPBX-specific
+        modules, such as asterisk_click2dial or ovh_telephony_connector'''
+        return {'dialed_number': erp_number}
+
+    @api.model
+    def convert_to_dial_number(self, erp_number):
+        '''
+        This function is dedicated to the transformation of the number
+        available in Odoo to the number that can be dialed.
+        You may have to inherit this function in another module specific
+        for your company if you are not happy with the way I reformat
+        the numbers.
+        '''
+        assert(erp_number), 'Missing phone number'
+        _logger.debug('Number before reformat = %s' % erp_number)
+        # erp_number are supposed to be in E.164 format, so no need to
+        # give a country code here
+        parsed_num = phonenumbers.parse(erp_number, None)
+        country_code = self.env.user.company_id.country_id.code
+        assert(country_code), 'Missing country on company'
+        _logger.debug('Country code = %s' % country_code)
+        to_dial_number = phonenumbers.format_out_of_country_calling_number(
+            parsed_num, country_code.upper())
+        to_dial_number = str(to_dial_number).translate(None, ' -.()/')
+        _logger.debug('Number to be sent to phone system: %s' % to_dial_number)
+        return to_dial_number
+
+
+class ResPartner(models.Model):
+    _name = 'res.partner'
+    _inherit = ['res.partner', 'phone.common']
+    _phone_fields = ['phone', 'mobile', 'fax']
+    _phone_name_sequence = 10
+    _country_field = 'country_id'
+    _partner_field = None
+
+    def create(self, cr, uid, vals, context=None):
+        vals_reformated = self._generic_reformat_phonenumbers(
+            cr, uid, None, vals, context=context)
+        return super(ResPartner, self).create(
+            cr, uid, vals_reformated, context=context)
+
+    def write(self, cr, uid, ids, vals, context=None):
+        vals_reformated = self._generic_reformat_phonenumbers(
+            cr, uid, ids, vals, context=context)
+        return super(ResPartner, self).write(
+            cr, uid, ids, vals_reformated, context=context)
+
+    def name_get(self, cr, uid, ids, context=None):
+        if context is None:
+            context = {}
+        if context.get('callerid'):
+            res = []
+            if isinstance(ids, (int, long)):
+                ids = [ids]
+            for partner in self.browse(cr, uid, ids, context=context):
+                if partner.parent_id and partner.parent_id.is_company:
+                    name = u'%s (%s)' % (partner.name, partner.parent_id.name)
+                else:
+                    name = partner.name
+                res.append((partner.id, name))
+            return res
+        else:
+            return super(ResPartner, self).name_get(
+                cr, uid, ids, context=context)
+
+
+class ResCompany(models.Model):
+    _inherit = 'res.company'
+
+    number_of_digits_to_match_from_end = fields.Integer(
+        string='Number of Digits To Match From End',
+        default=8,
+        help="In several situations, OpenERP will have to find a "
+        "Partner/Lead/Employee/... from a phone number presented by the "
+        "calling party. As the phone numbers presented by your phone "
+        "operator may not always be displayed in a standard format, "
+        "the best method to find the related Partner/Lead/Employee/... "
+        "in OpenERP is to try to match the end of the phone number in "
+        "OpenERP with the N last digits of the phone number presented "
+        "by the calling party. N is the value you should enter in this "
+        "field.")
+
+    _sql_constraints = [(
+        'number_of_digits_to_match_from_end_positive',
+        'CHECK (number_of_digits_to_match_from_end > 0)',
+        "The value of the field 'Number of Digits To Match From End' must "
+        "be positive."),
+        ]

BIN
base_phone.pyc


+ 35 - 0
controller.py

@@ -0,0 +1,35 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Base Phone module for Odoo
+#    Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import openerp
+
+
+class BasePhoneController(openerp.addons.web.http.Controller):
+    _cp_path = '/base_phone'
+
+    @openerp.addons.web.http.jsonrequest
+    def click2dial(self, req, phone_number, click2dial_model, click2dial_id):
+        res = req.session.model('phone.common').click2dial(
+            phone_number, {
+                'click2dial_model': click2dial_model,
+                'click2dial_id': click2dial_id,
+                })
+        return res

BIN
controller.pyc


+ 273 - 0
i18n/base_phone.pot

@@ -0,0 +1,273 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* base_phone
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-08-25 21:28+0000\n"
+"PO-Revision-Date: 2014-08-25 21:28+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:0
+msgid "Cancel"
+msgstr ""
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:95
+#, python-format
+msgid "Cannot reformat the phone number '%s' to international format. Error message: %s"
+msgstr ""
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:34
+#, python-format
+msgid "Click2dial started"
+msgstr ""
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:46
+#, python-format
+msgid "Click2dial successfull"
+msgstr ""
+
+#. module: base_phone
+#: view:number.not.found:0
+msgid "Close"
+msgstr ""
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:85
+#, python-format
+msgid "Create New Partner"
+msgstr ""
+
+#. module: base_phone
+#: view:number.not.found:0
+msgid "Create Partner with this Number"
+msgstr ""
+
+#. module: base_phone
+#: view:number.not.found:0
+msgid "Create or Update a Partner"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,current_partner_mobile:0
+msgid "Current Mobile"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,current_partner_phone:0
+msgid "Current Phone"
+msgstr ""
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:31
+#, python-format
+msgid "Dial"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,e164_number:0
+msgid "E.164 Number"
+msgstr ""
+
+#. module: base_phone
+#: help:number.not.found,e164_number:0
+msgid "E.164 equivalent of the calling number."
+msgstr ""
+
+#. module: base_phone
+#: view:res.users:0
+msgid "Email Preferences"
+msgstr ""
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:83
+#: code:addons/base_phone/base_phone.py:94
+#: code:addons/base_phone/wizard/number_not_found.py:99
+#, python-format
+msgid "Error:"
+msgstr ""
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Fixed"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,number_type:0
+msgid "Fixed/Mobile"
+msgstr ""
+
+#. module: base_phone
+#: help:res.company,number_of_digits_to_match_from_end:0
+msgid "In several situations, OpenERP will have to find a Partner/Lead/Employee/... from a phone number presented by the calling party. As the phone numbers presented by your phone operator may not always be displayed in a standard format, the best method to find the related Partner/Lead/Employee/... in OpenERP is to try to match the end of the phone number in OpenERP with the N last digits of the phone number presented by the calling party. N is the value you should enter in this field."
+msgstr ""
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Mobile"
+msgstr ""
+
+#. module: base_phone
+#: view:number.not.found:0
+msgid "Number Not Found"
+msgstr ""
+
+#. module: base_phone
+#: view:number.not.found:0
+msgid "Number converted to international format:"
+msgstr ""
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:47
+#, python-format
+msgid "Number dialed:"
+msgstr ""
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_number_not_found
+msgid "Number not found"
+msgstr ""
+
+#. module: base_phone
+#: view:number.not.found:0
+msgid "Number not found:"
+msgstr ""
+
+#. module: base_phone
+#: field:res.company,number_of_digits_to_match_from_end:0
+msgid "Number of Digits To Match From End"
+msgstr ""
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:105
+#, python-format
+msgid "Partner: %s"
+msgstr ""
+
+#. module: base_phone
+#: view:res.company:0
+msgid "Phone"
+msgstr ""
+
+#. module: base_phone
+#: model:res.groups,name:base_phone.group_callerid
+msgid "Phone CallerID"
+msgstr ""
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,phonenumbers_not_reformatted:0
+msgid "Phone numbers that couldn't be reformatted"
+msgstr ""
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:0
+msgid "Phone numbers that couldn't be reformatted:"
+msgstr ""
+
+#. module: base_phone
+#: model:ir.actions.act_window,name:base_phone.reformat_all_phonenumbers_action
+#: model:ir.ui.menu,name:base_phone.reformat_all_phonenumbers_menu
+msgid "Reformat Phone Numbers"
+msgstr ""
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_reformat_all_phonenumbers
+#: view:reformat.all.phonenumbers:0
+msgid "Reformat all phone numbers"
+msgstr ""
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:100
+#, python-format
+msgid "Select the Partner to Update."
+msgstr ""
+
+#. module: base_phone
+#: model:ir.ui.menu,name:base_phone.menu_config_phone
+#: view:res.users:0
+msgid "Telephony"
+msgstr ""
+
+#. module: base_phone
+#: view:res.users:0
+msgid "Telephony Preferences"
+msgstr ""
+
+#. module: base_phone
+#: sql_constraint:res.company:0
+msgid "The value of the field 'Number of Digits To Match From End' must be positive."
+msgstr ""
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:0
+msgid "This wizard reformats the phone, mobile and fax numbers of all partners in standard international format e.g. +33141981242"
+msgstr ""
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:35
+#, python-format
+msgid "Unhook your ringing phone"
+msgstr ""
+
+#. module: base_phone
+#: view:number.not.found:0
+msgid "Update Partner with this Number"
+msgstr ""
+
+#. module: base_phone
+#: constraint:res.partner:0
+msgid "You cannot create recursive Partner hierarchies."
+msgstr ""
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:84
+#, python-format
+msgid "You should set a country on the company '%s'"
+msgstr ""
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_base_phone_installed
+msgid "base.phone.installed"
+msgstr ""
+
+#. module: base_phone
+#: view:res.partner:0
+msgid "fax"
+msgstr ""
+
+#. module: base_phone
+#: view:res.partner:0
+msgid "phone"
+msgstr ""
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_phone_common
+msgid "phone.common"
+msgstr ""
+

+ 337 - 0
i18n/en.po

@@ -0,0 +1,337 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * base_phone
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: connector-telephony (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-10-29 13:29+0000\n"
+"PO-Revision-Date: 2015-10-29 13:29+0000\n"
+"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
+"Language-Team: English (http://www.transifex.com/oca/OCA-connector-telephony-8-0/language/en/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: en\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: base_phone
+#: field:number.not.found,calling_number:0
+msgid "Calling Number"
+msgstr "Calling Number"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Cancel"
+msgstr "Cancel"
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:112
+#, python-format
+msgid ""
+"Cannot reformat the phone number '%s' to international format. Error "
+"message: %s"
+msgstr "Cannot reformat the phone number '%s' to international format. Error message: %s"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:46
+#, python-format
+msgid "Click2dial started"
+msgstr "Click2dial started"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:58
+#, python-format
+msgid "Click2dial successfull"
+msgstr "Click2dial successfull"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Close"
+msgstr "Close"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_company
+msgid "Companies"
+msgstr "Companies"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:87
+#, python-format
+msgid "Create New Partner"
+msgstr "Create New Partner"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create Partner with this Number"
+msgstr "Create Partner with this Number"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create or Update a Partner"
+msgstr "Create or Update a Partner"
+
+#. module: base_phone
+#: field:number.not.found,create_uid:0
+#: field:reformat.all.phonenumbers,create_uid:0
+msgid "Created by"
+msgstr "Created by"
+
+#. module: base_phone
+#: field:number.not.found,create_date:0
+#: field:reformat.all.phonenumbers,create_date:0
+msgid "Created on"
+msgstr "Created on"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_mobile:0
+msgid "Current Mobile"
+msgstr "Current Mobile"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_phone:0
+msgid "Current Phone"
+msgstr "Current Phone"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:39
+#, python-format
+msgid "Dial"
+msgstr "Dial"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Done"
+msgstr "Done"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Draft"
+msgstr "Draft"
+
+#. module: base_phone
+#: field:number.not.found,e164_number:0
+msgid "E.164 Number"
+msgstr "E.164 Number"
+
+#. module: base_phone
+#: help:number.not.found,e164_number:0
+msgid "E.164 equivalent of the calling number."
+msgstr "E.164 equivalent of the calling number."
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Email Preferences"
+msgstr "Email Preferences"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:101
+#, python-format
+msgid "Error:"
+msgstr "Error:"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Fixed"
+msgstr "Fixed"
+
+#. module: base_phone
+#: field:number.not.found,number_type:0
+msgid "Fixed/Mobile"
+msgstr "Fixed/Mobile"
+
+#. module: base_phone
+#: field:base.phone.installed,id:0 field:number.not.found,id:0
+#: field:phone.common,id:0 field:reformat.all.phonenumbers,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: base_phone
+#: help:res.company,number_of_digits_to_match_from_end:0
+msgid ""
+"In several situations, OpenERP will have to find a Partner/Lead/Employee/..."
+" from a phone number presented by the calling party. As the phone numbers "
+"presented by your phone operator may not always be displayed in a standard "
+"format, the best method to find the related Partner/Lead/Employee/... in "
+"OpenERP is to try to match the end of the phone number in OpenERP with the N"
+" last digits of the phone number presented by the calling party. N is the "
+"value you should enter in this field."
+msgstr "In several situations, OpenERP will have to find a Partner/Lead/Employee/... from a phone number presented by the calling party. As the phone numbers presented by your phone operator may not always be displayed in a standard format, the best method to find the related Partner/Lead/Employee/... in OpenERP is to try to match the end of the phone number in OpenERP with the N last digits of the phone number presented by the calling party. N is the value you should enter in this field."
+
+#. module: base_phone
+#: field:number.not.found,write_uid:0
+#: field:reformat.all.phonenumbers,write_uid:0
+msgid "Last Updated by"
+msgstr "Last Updated by"
+
+#. module: base_phone
+#: field:number.not.found,write_date:0
+#: field:reformat.all.phonenumbers,write_date:0
+msgid "Last Updated on"
+msgstr "Last Updated on"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Mobile"
+msgstr "Mobile"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number Not Found"
+msgstr "Number Not Found"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number converted to international format:"
+msgstr "Number converted to international format:"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:59
+#, python-format
+msgid "Number dialed:"
+msgstr "Number dialed:"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_number_not_found
+msgid "Number not found"
+msgstr "Number not found"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number not found:"
+msgstr "Number not found:"
+
+#. module: base_phone
+#: field:res.company,number_of_digits_to_match_from_end:0
+msgid "Number of Digits To Match From End"
+msgstr "Number of Digits To Match From End"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_partner
+msgid "Partner"
+msgstr "Partner"
+
+#. module: base_phone
+#: help:number.not.found,to_update_partner_id:0
+msgid "Partner on which the phone number will be written"
+msgstr "Partner on which the phone number will be written"
+
+#. module: base_phone
+#: field:number.not.found,to_update_partner_id:0
+msgid "Partner to Update"
+msgstr "Partner to Update"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:107
+#, python-format
+msgid "Partner: %s"
+msgstr "Partner: %s"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+msgid "Phone"
+msgstr "Phone"
+
+#. module: base_phone
+#: model:res.groups,name:base_phone.group_callerid
+msgid "Phone CallerID"
+msgstr "Phone CallerID"
+
+#. module: base_phone
+#: help:number.not.found,calling_number:0
+msgid ""
+"Phone number of calling party that has been obtained from the telephony "
+"server, in the format used by the telephony server (not E.164)."
+msgstr "Phone number of calling party that has been obtained from the telephony server, in the format used by the telephony server (not E.164)."
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,phonenumbers_not_reformatted:0
+msgid "Phone numbers that couldn't be reformatted"
+msgstr "Phone numbers that couldn't be reformatted"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Phone numbers that couldn't be reformatted:"
+msgstr "Phone numbers that couldn't be reformatted:"
+
+#. module: base_phone
+#: model:ir.actions.act_window,name:base_phone.reformat_all_phonenumbers_action
+#: model:ir.ui.menu,name:base_phone.reformat_all_phonenumbers_menu
+msgid "Reformat Phone Numbers"
+msgstr "Reformat Phone Numbers"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_reformat_all_phonenumbers
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Reformat all phone numbers"
+msgstr "Reformat all phone numbers"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:102
+#, python-format
+msgid "Select the Partner to Update."
+msgstr "Select the Partner to Update."
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,state:0
+msgid "State"
+msgstr "State"
+
+#. module: base_phone
+#: model:ir.ui.menu,name:base_phone.menu_config_phone
+#: view:res.users:base_phone.view_users_form
+msgid "Telephony"
+msgstr "Telephony"
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Telephony Preferences"
+msgstr "Telephony Preferences"
+
+#. module: base_phone
+#: sql_constraint:res.company:0
+msgid ""
+"The value of the field 'Number of Digits To Match From End' must be "
+"positive."
+msgstr "The value of the field 'Number of Digits To Match From End' must be positive."
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid ""
+"This wizard reformats the phone, mobile and fax numbers of all partners in "
+"standard international format e.g. +33141981242"
+msgstr "This wizard reformats the phone, mobile and fax numbers of all partners in standard international format e.g. +33141981242"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:47
+#, python-format
+msgid "Unhook your ringing phone"
+msgstr "Unhook your ringing phone"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Update Partner with this Number"
+msgstr "Update Partner with this Number"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+msgid "fax"
+msgstr "fax"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+#: view:res.partner:base_phone.view_partner_simple_form
+#: view:res.partner:base_phone.view_partner_tree
+msgid "phone"
+msgstr "phone"

+ 339 - 0
i18n/es.po

@@ -0,0 +1,339 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * base_phone
+# 
+# Translators:
+# Antonio Trueba, 2016
+# Enrique Zanardi <ezanardi@atlantux.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: connector-telephony (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-11-01 04:07+0000\n"
+"PO-Revision-Date: 2016-01-07 14:27+0000\n"
+"Last-Translator: Antonio Trueba\n"
+"Language-Team: Spanish (http://www.transifex.com/oca/OCA-connector-telephony-8-0/language/es/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: base_phone
+#: field:number.not.found,calling_number:0
+msgid "Calling Number"
+msgstr "Número llamante"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:112
+#, python-format
+msgid ""
+"Cannot reformat the phone number '%s' to international format. Error "
+"message: %s"
+msgstr "No se puede reformatear el número de teléfono '%s' al formato internacional. Mensaje de error: %s"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:46
+#, python-format
+msgid "Click2dial started"
+msgstr "Click2dial iniciado"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:58
+#, python-format
+msgid "Click2dial successfull"
+msgstr ""
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Close"
+msgstr "Cerrar"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_company
+msgid "Companies"
+msgstr "Compañías"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:87
+#, python-format
+msgid "Create New Partner"
+msgstr "Crear nueva empresa"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create Partner with this Number"
+msgstr "Crear empresa con éste número"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create or Update a Partner"
+msgstr "Crear o actualizar empresa"
+
+#. module: base_phone
+#: field:number.not.found,create_uid:0
+#: field:reformat.all.phonenumbers,create_uid:0
+msgid "Created by"
+msgstr "Creado por"
+
+#. module: base_phone
+#: field:number.not.found,create_date:0
+#: field:reformat.all.phonenumbers,create_date:0
+msgid "Created on"
+msgstr "Creado el"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_mobile:0
+msgid "Current Mobile"
+msgstr "Móvil actual"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_phone:0
+msgid "Current Phone"
+msgstr "Teléfono actual"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:39
+#, python-format
+msgid "Dial"
+msgstr "Llamar"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Done"
+msgstr "Hecho"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Draft"
+msgstr "Borrador"
+
+#. module: base_phone
+#: field:number.not.found,e164_number:0
+msgid "E.164 Number"
+msgstr "Número E.164"
+
+#. module: base_phone
+#: help:number.not.found,e164_number:0
+msgid "E.164 equivalent of the calling number."
+msgstr "Equivalente E.164 del número que llama"
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Email Preferences"
+msgstr "Preferencias de correo electrónico"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:101
+#, python-format
+msgid "Error:"
+msgstr "Error:"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Fixed"
+msgstr "Teléfono fijo"
+
+#. module: base_phone
+#: field:number.not.found,number_type:0
+msgid "Fixed/Mobile"
+msgstr "Fijo/móvil"
+
+#. module: base_phone
+#: field:base.phone.installed,id:0 field:number.not.found,id:0
+#: field:phone.common,id:0 field:reformat.all.phonenumbers,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: base_phone
+#: help:res.company,number_of_digits_to_match_from_end:0
+msgid ""
+"In several situations, OpenERP will have to find a Partner/Lead/Employee/..."
+" from a phone number presented by the calling party. As the phone numbers "
+"presented by your phone operator may not always be displayed in a standard "
+"format, the best method to find the related Partner/Lead/Employee/... in "
+"OpenERP is to try to match the end of the phone number in OpenERP with the N"
+" last digits of the phone number presented by the calling party. N is the "
+"value you should enter in this field."
+msgstr "En varias ocasiones, OpenERP tendrá que encontrar una empresa/oportunidad/empleado/... a partir del número de teléfono enviado por el interlocutor. Como los números de teléfono enviados por su operador de telefonía puede que a veces se muestren en un formato no estándar, el mejor método para encontrar la empresa/oportunidad/empleado/... relacionado en OpenERP es buscar que coincida el final del número de teléfono en OpenERP con los últimos N dígitos del número de teléfono enviado por el interlocutor. N es el número que debe introducir en este campo."
+
+#. module: base_phone
+#: field:number.not.found,write_uid:0
+#: field:reformat.all.phonenumbers,write_uid:0
+msgid "Last Updated by"
+msgstr "Última actualización por"
+
+#. module: base_phone
+#: field:number.not.found,write_date:0
+#: field:reformat.all.phonenumbers,write_date:0
+msgid "Last Updated on"
+msgstr "Última actualización el"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Mobile"
+msgstr "Teléfono móvil"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number Not Found"
+msgstr "Número no encontrado"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number converted to international format:"
+msgstr "Número convertido a formato internacional:"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:59
+#, python-format
+msgid "Number dialed:"
+msgstr "Número marcado:"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_number_not_found
+msgid "Number not found"
+msgstr "Número no encontrado"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number not found:"
+msgstr "Número no encontrado:"
+
+#. module: base_phone
+#: field:res.company,number_of_digits_to_match_from_end:0
+msgid "Number of Digits To Match From End"
+msgstr "Número de dígitos que coinciden al final."
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_partner
+msgid "Partner"
+msgstr "Empresa"
+
+#. module: base_phone
+#: help:number.not.found,to_update_partner_id:0
+msgid "Partner on which the phone number will be written"
+msgstr "Empresa en la que se escribirá el número de teléfono"
+
+#. module: base_phone
+#: field:number.not.found,to_update_partner_id:0
+msgid "Partner to Update"
+msgstr "Empresa a actualizar"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:107
+#, python-format
+msgid "Partner: %s"
+msgstr "Empresa: %s"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+msgid "Phone"
+msgstr "Teléfono"
+
+#. module: base_phone
+#: model:res.groups,name:base_phone.group_callerid
+msgid "Phone CallerID"
+msgstr "Identificación de llamada del teléfono"
+
+#. module: base_phone
+#: help:number.not.found,calling_number:0
+msgid ""
+"Phone number of calling party that has been obtained from the telephony "
+"server, in the format used by the telephony server (not E.164)."
+msgstr "Número de teléfono del interlocutor que ha sido obtenido desde el servidor de telefonía, en el formato usado por el servidor de telefonía (no E.164)"
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,phonenumbers_not_reformatted:0
+msgid "Phone numbers that couldn't be reformatted"
+msgstr "Números de teléfono que no pudieron reformatearse"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Phone numbers that couldn't be reformatted:"
+msgstr "Números de teléfono que no pudieron reformatearse:"
+
+#. module: base_phone
+#: model:ir.actions.act_window,name:base_phone.reformat_all_phonenumbers_action
+#: model:ir.ui.menu,name:base_phone.reformat_all_phonenumbers_menu
+msgid "Reformat Phone Numbers"
+msgstr "Reformatear números de teléfono"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_reformat_all_phonenumbers
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Reformat all phone numbers"
+msgstr "Reformatear todos los números de teléfono"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:102
+#, python-format
+msgid "Select the Partner to Update."
+msgstr "Escoja la empresa a actualizar"
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,state:0
+msgid "State"
+msgstr "Estado"
+
+#. module: base_phone
+#: model:ir.ui.menu,name:base_phone.menu_config_phone
+#: view:res.users:base_phone.view_users_form
+msgid "Telephony"
+msgstr "Telefonía"
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Telephony Preferences"
+msgstr "Preferencias de telefonía"
+
+#. module: base_phone
+#: sql_constraint:res.company:0
+msgid ""
+"The value of the field 'Number of Digits To Match From End' must be "
+"positive."
+msgstr "El valor del campo 'Número de dígitos que coinciden al final' debe ser positivo."
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid ""
+"This wizard reformats the phone, mobile and fax numbers of all partners in "
+"standard international format e.g. +33141981242"
+msgstr "Este asistente reformatea los números de teléfono fijo, móvil y fax de todas las empresas en formato estandar internacional, p.ej. +33141981242"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:47
+#, python-format
+msgid "Unhook your ringing phone"
+msgstr "Descuelgue su teléfono que está sonando."
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Update Partner with this Number"
+msgstr "Actualizar empresa con éste número"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+msgid "fax"
+msgstr "fax"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+#: view:res.partner:base_phone.view_partner_simple_form
+#: view:res.partner:base_phone.view_partner_tree
+msgid "phone"
+msgstr "teléfono"

+ 345 - 0
i18n/fr.po

@@ -0,0 +1,345 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * base_phone
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: connector-telephony (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-10-14 02:09+0000\n"
+"PO-Revision-Date: 2015-10-12 18:36+0000\n"
+"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
+"Language-Team: French (http://www.transifex.com/oca/OCA-connector-telephony-8-0/language/fr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: base_phone
+#: field:number.not.found,calling_number:0
+msgid "Calling Number"
+msgstr ""
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:112
+#, python-format
+msgid ""
+"Cannot reformat the phone number '%s' to international format. Error "
+"message: %s"
+msgstr "Impossible de reformatter le numéro de téléphone '%s' au format international. Message d'erreur : %s"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:46
+#, python-format
+msgid "Click2dial started"
+msgstr "Début du Click2dial"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:58
+#, python-format
+msgid "Click2dial successfull"
+msgstr "Click2dial réussi"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Close"
+msgstr "Fermer"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_company
+msgid "Companies"
+msgstr "Sociétés"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:87
+#, python-format
+msgid "Create New Partner"
+msgstr "Créer un nouveau partenaire"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create Partner with this Number"
+msgstr "Créer un partenaire avec ce numéro"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create or Update a Partner"
+msgstr "Créer ou mettre à jour un partenaire"
+
+#. module: base_phone
+#: field:number.not.found,create_uid:0
+#: field:reformat.all.phonenumbers,create_uid:0
+msgid "Created by"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,create_date:0
+#: field:reformat.all.phonenumbers,create_date:0
+msgid "Created on"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,current_partner_mobile:0
+msgid "Current Mobile"
+msgstr "Portable actuel"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_phone:0
+msgid "Current Phone"
+msgstr "Téléphone actuel"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:39
+#, python-format
+msgid "Dial"
+msgstr "Composer"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Done"
+msgstr ""
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,e164_number:0
+msgid "E.164 Number"
+msgstr "Numéro E.164"
+
+#. module: base_phone
+#: help:number.not.found,e164_number:0
+msgid "E.164 equivalent of the calling number."
+msgstr "Equivalent au format E.164 du numéro appelant."
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Email Preferences"
+msgstr "Préférences de messagerie électronique"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:101
+#, python-format
+msgid "Error:"
+msgstr "Erreur :"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Fixed"
+msgstr "Fixe"
+
+#. module: base_phone
+#: field:number.not.found,number_type:0
+msgid "Fixed/Mobile"
+msgstr "Fixe/Portable"
+
+#. module: base_phone
+#: field:base.phone.installed,id:0 field:number.not.found,id:0
+#: field:phone.common,id:0 field:reformat.all.phonenumbers,id:0
+msgid "ID"
+msgstr ""
+
+#. module: base_phone
+#: help:res.company,number_of_digits_to_match_from_end:0
+msgid ""
+"In several situations, OpenERP will have to find a Partner/Lead/Employee/..."
+" from a phone number presented by the calling party. As the phone numbers "
+"presented by your phone operator may not always be displayed in a standard "
+"format, the best method to find the related Partner/Lead/Employee/... in "
+"OpenERP is to try to match the end of the phone number in OpenERP with the N"
+" last digits of the phone number presented by the calling party. N is the "
+"value you should enter in this field."
+msgstr "In several situations, OpenERP will have to find a Partner/Lead/Employee/... from a phone number presented by the calling party. As the phone numbers presented by your phone operator may not always be displayed in a standard format, the best method to find the related Partner/Lead/Employee/... in OpenERP is to try to match the end of the phone number in OpenERP with the N last digits of the phone number presented by the calling party. N is the value you should enter in this field."
+
+#. module: base_phone
+#: field:number.not.found,write_uid:0
+#: field:reformat.all.phonenumbers,write_uid:0
+msgid "Last Updated by"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,write_date:0
+#: field:reformat.all.phonenumbers,write_date:0
+msgid "Last Updated on"
+msgstr ""
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Mobile"
+msgstr "Portable"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number Not Found"
+msgstr "Numéro introuvable"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number converted to international format:"
+msgstr "Numéro converti au format international :"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:59
+#, python-format
+msgid "Number dialed:"
+msgstr "Numéro composé :"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_number_not_found
+msgid "Number not found"
+msgstr "Numéro introuvable"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number not found:"
+msgstr "Numéro introuvable :"
+
+#. module: base_phone
+#: field:res.company,number_of_digits_to_match_from_end:0
+msgid "Number of Digits To Match From End"
+msgstr "Nombre de chiffres à faire correspondre en partant de la fin"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_partner
+msgid "Partner"
+msgstr "Partenaire"
+
+#. module: base_phone
+#: help:number.not.found,to_update_partner_id:0
+msgid "Partner on which the phone number will be written"
+msgstr ""
+
+#. module: base_phone
+#: field:number.not.found,to_update_partner_id:0
+msgid "Partner to Update"
+msgstr ""
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:107
+#, python-format
+msgid "Partner: %s"
+msgstr "Partenaire : %s"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+msgid "Phone"
+msgstr "Téléphone"
+
+#. module: base_phone
+#: model:res.groups,name:base_phone.group_callerid
+msgid "Phone CallerID"
+msgstr "CallerID du téléphone"
+
+#. module: base_phone
+#: help:number.not.found,calling_number:0
+msgid ""
+"Phone number of calling party that has been obtained from the telephony "
+"server, in the format used by the telephony server (not E.164)."
+msgstr ""
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,phonenumbers_not_reformatted:0
+msgid "Phone numbers that couldn't be reformatted"
+msgstr "Numéros de téléphone qui n'ont pas pu être reformatés"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Phone numbers that couldn't be reformatted:"
+msgstr "Numéros de téléphone qui n'ont pas pu être reformatés :"
+
+#. module: base_phone
+#: model:ir.actions.act_window,name:base_phone.reformat_all_phonenumbers_action
+#: model:ir.ui.menu,name:base_phone.reformat_all_phonenumbers_menu
+msgid "Reformat Phone Numbers"
+msgstr "Reformate les numéros de téléphone"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_reformat_all_phonenumbers
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Reformat all phone numbers"
+msgstr "Reformate tous les numéros de téléphone"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:102
+#, python-format
+msgid "Select the Partner to Update."
+msgstr "Selectionnez le partenaire à mettre à jour."
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,state:0
+msgid "State"
+msgstr ""
+
+#. module: base_phone
+#: model:ir.ui.menu,name:base_phone.menu_config_phone
+#: view:res.users:base_phone.view_users_form
+msgid "Telephony"
+msgstr "Téléphonie"
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Telephony Preferences"
+msgstr "Préférences téléphoniques"
+
+#. module: base_phone
+#: sql_constraint:res.company:0
+msgid ""
+"The value of the field 'Number of Digits To Match From End' must be "
+"positive."
+msgstr "The value of the field 'Number of Digits To Match From End' must be positive."
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid ""
+"This wizard reformats the phone, mobile and fax numbers of all partners in "
+"standard international format e.g. +33141981242"
+msgstr "Cet assistant reformate le numéro de téléphone fixe, portable et le fax de tous les partenaires au format standard international i.e. +33141981242"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:47
+#, python-format
+msgid "Unhook your ringing phone"
+msgstr "Décrochez votre téléphone"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Update Partner with this Number"
+msgstr "Mettre à jour le partenaire avec ce numéro"
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:81
+#, python-format
+msgid ""
+"You should set a country on the company '%s' to allow the reformat of phone "
+"numbers"
+msgstr ""
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+msgid "fax"
+msgstr "fax"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+#: view:res.partner:base_phone.view_partner_simple_form
+#: view:res.partner:base_phone.view_partner_tree
+msgid "phone"
+msgstr "phone"

+ 338 - 0
i18n/sl.po

@@ -0,0 +1,338 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * base_phone
+# 
+# Translators:
+# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: connector-telephony (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-10-29 13:29+0000\n"
+"PO-Revision-Date: 2015-10-29 13:29+0000\n"
+"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
+"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-connector-telephony-8-0/language/sl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: sl\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+
+#. module: base_phone
+#: field:number.not.found,calling_number:0
+msgid "Calling Number"
+msgstr "Klicna številka"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Cancel"
+msgstr "Preklic"
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:112
+#, python-format
+msgid ""
+"Cannot reformat the phone number '%s' to international format. Error "
+"message: %s"
+msgstr "Ni mogoče pretvoriti telefonske številke '%s' v mednarodni format. Sporočilo o napaki: %s"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:46
+#, python-format
+msgid "Click2dial started"
+msgstr "Click2dial zagnan"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:58
+#, python-format
+msgid "Click2dial successfull"
+msgstr "Click2dial uspešen"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Close"
+msgstr "Zaključi"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_company
+msgid "Companies"
+msgstr "Družbe"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:87
+#, python-format
+msgid "Create New Partner"
+msgstr "Ustvari novega partnerja"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create Partner with this Number"
+msgstr "Ustvari partnerja s to številko"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create or Update a Partner"
+msgstr "Ustvari ali posodobi partnerja"
+
+#. module: base_phone
+#: field:number.not.found,create_uid:0
+#: field:reformat.all.phonenumbers,create_uid:0
+msgid "Created by"
+msgstr "Ustvaril"
+
+#. module: base_phone
+#: field:number.not.found,create_date:0
+#: field:reformat.all.phonenumbers,create_date:0
+msgid "Created on"
+msgstr "Ustvarjeno"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_mobile:0
+msgid "Current Mobile"
+msgstr "Trenutna mobilna številka"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_phone:0
+msgid "Current Phone"
+msgstr "Trenutna telefonska številka"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:39
+#, python-format
+msgid "Dial"
+msgstr "Kliči"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Done"
+msgstr "Opravljeno"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Draft"
+msgstr "Osnutek"
+
+#. module: base_phone
+#: field:number.not.found,e164_number:0
+msgid "E.164 Number"
+msgstr "E.164 številka"
+
+#. module: base_phone
+#: help:number.not.found,e164_number:0
+msgid "E.164 equivalent of the calling number."
+msgstr "E.164 ekvivalent klicne številke."
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Email Preferences"
+msgstr "Prednostne nastavitve E-pošte"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:101
+#, python-format
+msgid "Error:"
+msgstr "Napaka:"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Fixed"
+msgstr "Fiksni"
+
+#. module: base_phone
+#: field:number.not.found,number_type:0
+msgid "Fixed/Mobile"
+msgstr "Fiksni/Mobilni"
+
+#. module: base_phone
+#: field:base.phone.installed,id:0 field:number.not.found,id:0
+#: field:phone.common,id:0 field:reformat.all.phonenumbers,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: base_phone
+#: help:res.company,number_of_digits_to_match_from_end:0
+msgid ""
+"In several situations, OpenERP will have to find a Partner/Lead/Employee/..."
+" from a phone number presented by the calling party. As the phone numbers "
+"presented by your phone operator may not always be displayed in a standard "
+"format, the best method to find the related Partner/Lead/Employee/... in "
+"OpenERP is to try to match the end of the phone number in OpenERP with the N"
+" last digits of the phone number presented by the calling party. N is the "
+"value you should enter in this field."
+msgstr "V različnih situacijah bo OpenERP moral najti partnerja/indic/kader/ preko številke klicatelja. Ker telefonski operaterji telefonske številke klicateljev ne prikazujejo vedno v standardnem formatu, je najboljša metoda iskanja ustreznega partnerja/indica/kadra/... s primerjanjem končnega dela številke z zadnjimi N znaki telefonske številke klicatelja. N je vrednost, ki se vstavi v to polje."
+
+#. module: base_phone
+#: field:number.not.found,write_uid:0
+#: field:reformat.all.phonenumbers,write_uid:0
+msgid "Last Updated by"
+msgstr "Zadnji posodobil"
+
+#. module: base_phone
+#: field:number.not.found,write_date:0
+#: field:reformat.all.phonenumbers,write_date:0
+msgid "Last Updated on"
+msgstr "Zadnjič posodobljeno"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Mobile"
+msgstr "Mobilni telefon"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number Not Found"
+msgstr "Številka ni najdena"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number converted to international format:"
+msgstr "Številka pretvorjena v mednarodni format:"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:59
+#, python-format
+msgid "Number dialed:"
+msgstr "Klicana številka:"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_number_not_found
+msgid "Number not found"
+msgstr "Številka ni najdena"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number not found:"
+msgstr "Številka ni najdena:"
+
+#. module: base_phone
+#: field:res.company,number_of_digits_to_match_from_end:0
+msgid "Number of Digits To Match From End"
+msgstr "Število znakov od konca številke za primerjavo"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_partner
+msgid "Partner"
+msgstr "Partner"
+
+#. module: base_phone
+#: help:number.not.found,to_update_partner_id:0
+msgid "Partner on which the phone number will be written"
+msgstr "Partner, pod katerega se bo zapisala telefonska številka"
+
+#. module: base_phone
+#: field:number.not.found,to_update_partner_id:0
+msgid "Partner to Update"
+msgstr "Partner za posodobitev"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:107
+#, python-format
+msgid "Partner: %s"
+msgstr "Partner: %s"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+msgid "Phone"
+msgstr "Telefon"
+
+#. module: base_phone
+#: model:res.groups,name:base_phone.group_callerid
+msgid "Phone CallerID"
+msgstr "ID klicatelja"
+
+#. module: base_phone
+#: help:number.not.found,calling_number:0
+msgid ""
+"Phone number of calling party that has been obtained from the telephony "
+"server, in the format used by the telephony server (not E.164)."
+msgstr "Telefonska številka klicatelja, ki je bila pridobljena iz telefonskega strežnika v formatu strežnika (ne E.164)."
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,phonenumbers_not_reformatted:0
+msgid "Phone numbers that couldn't be reformatted"
+msgstr "Telefonske številke, ki niso bile pretvorjene"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Phone numbers that couldn't be reformatted:"
+msgstr "Telefonske številke, ki niso bile pretvorjene:"
+
+#. module: base_phone
+#: model:ir.actions.act_window,name:base_phone.reformat_all_phonenumbers_action
+#: model:ir.ui.menu,name:base_phone.reformat_all_phonenumbers_menu
+msgid "Reformat Phone Numbers"
+msgstr "Pretvorba telefonskih številk"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_reformat_all_phonenumbers
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Reformat all phone numbers"
+msgstr "Pretvorba vseh telefonskih številk"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:102
+#, python-format
+msgid "Select the Partner to Update."
+msgstr "Izbira partnerja za posodobitev"
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,state:0
+msgid "State"
+msgstr "Stanje"
+
+#. module: base_phone
+#: model:ir.ui.menu,name:base_phone.menu_config_phone
+#: view:res.users:base_phone.view_users_form
+msgid "Telephony"
+msgstr "Telefonija"
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Telephony Preferences"
+msgstr "Nastavitve telefonije"
+
+#. module: base_phone
+#: sql_constraint:res.company:0
+msgid ""
+"The value of the field 'Number of Digits To Match From End' must be "
+"positive."
+msgstr "Vrednost polja 'Število znakov od konca številke za primerjavo' mora biti pozitivna."
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid ""
+"This wizard reformats the phone, mobile and fax numbers of all partners in "
+"standard international format e.g. +33141981242"
+msgstr "Čarovnik za pretvorbo telefonskih številk partnerjev v mednarodni format, npr, +33141981242"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:47
+#, python-format
+msgid "Unhook your ringing phone"
+msgstr "Dvigni slušalko pri zvonjenju"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Update Partner with this Number"
+msgstr "Posodobitev partnerja s to številko"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+msgid "fax"
+msgstr "faks"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+#: view:res.partner:base_phone.view_partner_simple_form
+#: view:res.partner:base_phone.view_partner_tree
+msgid "phone"
+msgstr "telefon"

+ 338 - 0
i18n/tr.po

@@ -0,0 +1,338 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * base_phone
+# 
+# Translators:
+# Altinisik <aaltinisik@altinkaya.com.tr>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: connector-telephony (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-11-01 04:07+0000\n"
+"PO-Revision-Date: 2015-12-18 20:39+0000\n"
+"Last-Translator: Altinisik <aaltinisik@altinkaya.com.tr>\n"
+"Language-Team: Turkish (http://www.transifex.com/oca/OCA-connector-telephony-8-0/language/tr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: tr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: base_phone
+#: field:number.not.found,calling_number:0
+msgid "Calling Number"
+msgstr "Arayan No"
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Cancel"
+msgstr "İptal"
+
+#. module: base_phone
+#: code:addons/base_phone/base_phone.py:112
+#, python-format
+msgid ""
+"Cannot reformat the phone number '%s' to international format. Error "
+"message: %s"
+msgstr "Telefon numarası '%s' uluslararası formata çevrilemedi. Hata mesajı: %s"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:46
+#, python-format
+msgid "Click2dial started"
+msgstr "Tıkla çevir başlatıldı"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:58
+#, python-format
+msgid "Click2dial successfull"
+msgstr "Tıkla çevir başarılı"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Close"
+msgstr "Kapat"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_company
+msgid "Companies"
+msgstr "Şirketler"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:87
+#, python-format
+msgid "Create New Partner"
+msgstr "Yeni iş ortağı oluştur"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create Partner with this Number"
+msgstr "Bu numara ile yeni iş ortağı oluştur"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Create or Update a Partner"
+msgstr "Bir iş ortağı Oluştur ya da Güncelle"
+
+#. module: base_phone
+#: field:number.not.found,create_uid:0
+#: field:reformat.all.phonenumbers,create_uid:0
+msgid "Created by"
+msgstr "Oluşturan"
+
+#. module: base_phone
+#: field:number.not.found,create_date:0
+#: field:reformat.all.phonenumbers,create_date:0
+msgid "Created on"
+msgstr "Oluşturuldu"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_mobile:0
+msgid "Current Mobile"
+msgstr "Kayıtlı Cep"
+
+#. module: base_phone
+#: field:number.not.found,current_partner_phone:0
+msgid "Current Phone"
+msgstr "Kayıtlı Telefon"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:39
+#, python-format
+msgid "Dial"
+msgstr "Çevir"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Done"
+msgstr "Tamam"
+
+#. module: base_phone
+#: selection:reformat.all.phonenumbers,state:0
+msgid "Draft"
+msgstr "Taslak"
+
+#. module: base_phone
+#: field:number.not.found,e164_number:0
+msgid "E.164 Number"
+msgstr "E.164 Numara"
+
+#. module: base_phone
+#: help:number.not.found,e164_number:0
+msgid "E.164 equivalent of the calling number."
+msgstr "arayan numaranın E.164 eşdeğeri"
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Email Preferences"
+msgstr "E posta Seçenekleri"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:101
+#, python-format
+msgid "Error:"
+msgstr "Hata:"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Fixed"
+msgstr "Sabit"
+
+#. module: base_phone
+#: field:number.not.found,number_type:0
+msgid "Fixed/Mobile"
+msgstr "Sabit/Cep"
+
+#. module: base_phone
+#: field:base.phone.installed,id:0 field:number.not.found,id:0
+#: field:phone.common,id:0 field:reformat.all.phonenumbers,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: base_phone
+#: help:res.company,number_of_digits_to_match_from_end:0
+msgid ""
+"In several situations, OpenERP will have to find a Partner/Lead/Employee/..."
+" from a phone number presented by the calling party. As the phone numbers "
+"presented by your phone operator may not always be displayed in a standard "
+"format, the best method to find the related Partner/Lead/Employee/... in "
+"OpenERP is to try to match the end of the phone number in OpenERP with the N"
+" last digits of the phone number presented by the calling party. N is the "
+"value you should enter in this field."
+msgstr "Bir çok farklı durumda Odoo arayan numaradan bir İş ortağı/Çalışan vs bulmalıdır. Telefon numaraları servis sağlayıcılar tarafından farklı biçimlerde gönderilebildiği için en iyi yöntem telefon numarasının son N hanesi ile eşleşen kaydı bulmaktır. N bu alana girmeniz gereken değerdir."
+
+#. module: base_phone
+#: field:number.not.found,write_uid:0
+#: field:reformat.all.phonenumbers,write_uid:0
+msgid "Last Updated by"
+msgstr "Son güncelleyen"
+
+#. module: base_phone
+#: field:number.not.found,write_date:0
+#: field:reformat.all.phonenumbers,write_date:0
+msgid "Last Updated on"
+msgstr "Son güncellendiği"
+
+#. module: base_phone
+#: selection:number.not.found,number_type:0
+msgid "Mobile"
+msgstr "Cep"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number Not Found"
+msgstr "Numara bulunamadı"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number converted to international format:"
+msgstr "Uluslarası biçime çevrilen numara:"
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:59
+#, python-format
+msgid "Number dialed:"
+msgstr "Aranan numara:"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_number_not_found
+msgid "Number not found"
+msgstr "Numara bulunamadı"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Number not found:"
+msgstr "Numara bulunamadı:"
+
+#. module: base_phone
+#: field:res.company,number_of_digits_to_match_from_end:0
+msgid "Number of Digits To Match From End"
+msgstr "Sondan eşleştirilecek rakam adedi"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_res_partner
+msgid "Partner"
+msgstr "İş Ortağı"
+
+#. module: base_phone
+#: help:number.not.found,to_update_partner_id:0
+msgid "Partner on which the phone number will be written"
+msgstr "Telefon numarasının yazılacağı iş ortağı"
+
+#. module: base_phone
+#: field:number.not.found,to_update_partner_id:0
+msgid "Partner to Update"
+msgstr "Güncellenecek iş ortağı"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:107
+#, python-format
+msgid "Partner: %s"
+msgstr "iş ortağı: %s"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+msgid "Phone"
+msgstr "Telefon"
+
+#. module: base_phone
+#: model:res.groups,name:base_phone.group_callerid
+msgid "Phone CallerID"
+msgstr "Telefon CallerID"
+
+#. module: base_phone
+#: help:number.not.found,calling_number:0
+msgid ""
+"Phone number of calling party that has been obtained from the telephony "
+"server, in the format used by the telephony server (not E.164)."
+msgstr "Sizi arayan numaranın telefon sunucusundan alınan telefon numarası (E.164 değil)"
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,phonenumbers_not_reformatted:0
+msgid "Phone numbers that couldn't be reformatted"
+msgstr "yeniden biçimlendirilemeyen telefon numaraları "
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Phone numbers that couldn't be reformatted:"
+msgstr "Yeniden biçimlendirilemeyen telefon numaraları:"
+
+#. module: base_phone
+#: model:ir.actions.act_window,name:base_phone.reformat_all_phonenumbers_action
+#: model:ir.ui.menu,name:base_phone.reformat_all_phonenumbers_menu
+msgid "Reformat Phone Numbers"
+msgstr "Telefon numaralarını yeniden biçimlendir"
+
+#. module: base_phone
+#: model:ir.model,name:base_phone.model_reformat_all_phonenumbers
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid "Reformat all phone numbers"
+msgstr "Bütün telefon numaralarını yeniden biçimlendir"
+
+#. module: base_phone
+#: code:addons/base_phone/wizard/number_not_found.py:102
+#, python-format
+msgid "Select the Partner to Update."
+msgstr "Güncellenecek iş ortağını seçin."
+
+#. module: base_phone
+#: field:reformat.all.phonenumbers,state:0
+msgid "State"
+msgstr "Durum"
+
+#. module: base_phone
+#: model:ir.ui.menu,name:base_phone.menu_config_phone
+#: view:res.users:base_phone.view_users_form
+msgid "Telephony"
+msgstr "Telefon"
+
+#. module: base_phone
+#: view:res.users:base_phone.view_users_form
+#: view:res.users:base_phone.view_users_form_simple_modif
+msgid "Telephony Preferences"
+msgstr "Telefon Ayarları"
+
+#. module: base_phone
+#: sql_constraint:res.company:0
+msgid ""
+"The value of the field 'Number of Digits To Match From End' must be "
+"positive."
+msgstr "'Sondan eşleştirilecek rakam adedi' alanına sadece pozitif sayılar girilmelidir."
+
+#. module: base_phone
+#: view:reformat.all.phonenumbers:base_phone.reformat_all_phonenumbers_form
+msgid ""
+"This wizard reformats the phone, mobile and fax numbers of all partners in "
+"standard international format e.g. +33141981242"
+msgstr "Bu sihirbaz Cep, sabit telefon ve faks numaralarını standart E.164 uluslararası biçime sokar."
+
+#. module: base_phone
+#. openerp-web
+#: code:addons/base_phone/static/src/js/phone_widget.js:47
+#, python-format
+msgid "Unhook your ringing phone"
+msgstr "Çalan telefonunuzu açın"
+
+#. module: base_phone
+#: view:number.not.found:base_phone.number_not_found_form
+msgid "Update Partner with this Number"
+msgstr "İş ortağını bu numara ile güncelle"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+msgid "fax"
+msgstr "Faks"
+
+#. module: base_phone
+#: view:res.company:base_phone.view_company_form
+#: view:res.partner:base_phone.view_partner_form
+#: view:res.partner:base_phone.view_partner_simple_form
+#: view:res.partner:base_phone.view_partner_tree
+msgid "phone"
+msgstr "telefon"

+ 66 - 0
report_sxw_format.py

@@ -0,0 +1,66 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Base Phone module for OpenERP
+#    Copyright (C) 2014 Alexis de Lattre <alexis@via.ecp.fr>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp.osv import orm
+from openerp.report import report_sxw
+import phonenumbers
+
+
+class base_phone_installed(orm.AbstractModel):
+    '''When you use monkey patching, the code is executed when the module
+    is in the addons_path of the OpenERP server, even is the module is not
+    installed ! In order to avoid the side-effects it can create,
+    we create an AbstractModel inside the module and we test the
+    availability of this Model in the code of the monkey patching below.
+    At Akretion, we call this the "Guewen trick", in reference
+    to a trick used by Guewen Baconnier in the "connector" module.
+    '''
+    _name = "base.phone.installed"
+
+
+format_original = report_sxw.rml_parse.format
+
+
+def format(
+        self, text, oldtag=None, phone=False, phone_format='international'):
+    if self.pool.get('base.phone.installed') and phone and text:
+        # text should already be in E164 format, so we don't have
+        # to give a country code to phonenumbers.parse()
+        try:
+            phone_number = phonenumbers.parse(text)
+            if phone_format == 'international':
+                res = phonenumbers.format_number(
+                    phone_number, phonenumbers.PhoneNumberFormat.INTERNATIONAL)
+            elif phone_format == 'national':
+                res = phonenumbers.format_number(
+                    phone_number, phonenumbers.PhoneNumberFormat.NATIONAL)
+            elif phone_format == 'e164':
+                res = phonenumbers.format_number(
+                    phone_number, phonenumbers.PhoneNumberFormat.E164)
+            else:
+                res = text
+        except:
+            res = text
+    else:
+        res = format_original(self, text, oldtag=oldtag)
+    return res
+
+report_sxw.rml_parse.format = format

BIN
report_sxw_format.pyc


+ 1 - 0
requirements.txt

@@ -0,0 +1 @@
+phonenumbers

+ 33 - 0
res_company_view.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+    Copyright (C) 2014 Akretion (http://www.akretion.com/)
+    @author Alexis de Lattre <alexis.delattre@akretion.com>
+    The licence is in the file __openerp__.py
+-->
+
+<openerp>
+<data>
+
+<record id="view_company_form" model="ir.ui.view">
+    <field name="name">base_phone.company.form</field>
+    <field name="model">res.company</field>
+    <field name="inherit_id" ref="base.view_company_form" />
+    <field name="arch" type="xml">
+        <group name="account_grp" position="after">
+            <group name="phone" string="Phone">
+                <field name="number_of_digits_to_match_from_end" />
+            </group>
+        </group>
+        <field name="phone" position="attributes">
+            <attribute name="widget">phone</attribute>
+        </field>
+        <field name="fax" position="attributes">
+            <attribute name="widget">fax</attribute>
+        </field>
+    </field>
+</record>
+
+
+</data>
+</openerp>

+ 64 - 0
res_partner_view.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Base Phone module for OpenERP
+  Copyright (C) 2010-2014 Alexis de Lattre <alexis@via.ecp.fr>
+  The licence is in the file __openerp__.py
+-->
+
+<openerp>
+<data>
+
+<record id="view_partner_simple_form" model="ir.ui.view">
+    <field name="name">base.phone.res.partner.simplified.form</field>
+    <field name="model">res.partner</field>
+    <field name="inherit_id" ref="base.view_partner_simple_form"/>
+    <field name="arch" type="xml">
+        <field name="phone" position="attributes">
+            <attribute name="widget">phone</attribute>
+        </field>
+        <field name="mobile" position="attributes">
+            <attribute name="widget">phone</attribute>
+        </field>
+    </field>
+</record>
+
+<record id="view_partner_form" model="ir.ui.view">
+    <field name="name">base.phone.res.partner.form</field>
+    <field name="model">res.partner</field>
+    <field name="inherit_id" ref="base.view_partner_form"/>
+    <field name="arch" type="xml">
+        <xpath expr="//group/group/field[@name='phone']" position="attributes">
+            <attribute name="widget">phone</attribute>
+        </xpath>
+        <xpath expr="//group/group/field[@name='mobile']" position="attributes">
+            <attribute name="widget">phone</attribute>
+        </xpath>
+        <xpath expr="//group/group/field[@name='fax']" position="attributes">
+            <attribute name="widget">fax</attribute>
+        </xpath>
+        <xpath expr="//form[@string='Contact']/sheet/group/field[@name='phone']" position="attributes">
+            <attribute name="widget">phone</attribute>
+        </xpath>
+        <xpath expr="//form[@string='Contact']/sheet/group/field[@name='mobile']" position="attributes">
+            <attribute name="widget">phone</attribute>
+        </xpath>
+    </field>
+</record>
+
+<record id="view_partner_tree" model="ir.ui.view">
+    <field name="name">base_phone.phone.widget.partner.tree</field>
+    <field name="model">res.partner</field>
+    <field name="inherit_id" ref="base.view_partner_tree"/>
+    <field name="arch" type="xml">
+        <field name="phone" position="attributes">
+            <attribute name="widget">phone</attribute>
+        </field>
+    </field>
+</record>
+
+<record id="base.action_partner_form" model="ir.actions.act_window">
+    <field name="context">{'search_default_customer':1, 'raise_if_phone_parse_fails': True}</field>
+</record>
+
+</data>
+</openerp>

+ 40 - 0
res_users_view.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Base Phone module for OpenERP
+    Copyright (C) 2010-2014 Alexis de Lattre <alexis@via.ecp.fr>
+    The licence is in the file __openerp__.py
+-->
+
+<openerp>
+<data>
+
+<record id="view_users_form" model="ir.ui.view">
+    <field name="name">base_phone.res.users.telephony_tab</field>
+    <field name="model">res.users</field>
+    <field name="inherit_id" ref="base.view_users_form"/>
+    <field name="arch" type="xml">
+        <notebook position="inside">
+            <page string="Telephony" name="phone" invisible="1">
+            <!-- Empty page, which will be used by other phone modules -->
+                <group name="phone-preferences" string="Telephony Preferences">
+                </group>
+            </page>
+        </notebook>
+    </field>
+</record>
+
+<record id="view_users_form_simple_modif" model="ir.ui.view">
+    <field name="name">base_phone.user_preferences.view</field>
+    <field name="model">res.users</field>
+    <field name="inherit_id" ref="base.view_users_form_simple_modif" />
+    <field name="arch" type="xml">
+        <group string="Email Preferences" position="after">
+            <group name="phone" string="Telephony Preferences" invisible="1">
+            <!-- Empty group, that is used by other phone modules -->
+            </group>
+        </group>
+    </field>
+</record>
+
+</data>
+</openerp>

+ 2 - 0
security/ir.model.access.csv

@@ -0,0 +1,2 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+callerid_res_partner_read,Read access on res.partner,base.model_res_partner,group_callerid,1,0,0,0

+ 17 - 0
security/phone_security.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Base Phone module for Odoo/OpenERP
+  Copyright (C) 2010-2014 Alexis de Lattre <alexis@via.ecp.fr>
+  The licence is in the file __openerp__.py
+-->
+
+<openerp>
+<data noupdate="1">
+
+<!-- New group dedicated to the "Get CallerID name from OpenERP" feature -->
+<record id="group_callerid" model="res.groups">
+    <field name="name">Phone CallerID</field>
+</record>
+
+</data>
+</openerp>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 877 - 0
static/lib/phonenumbers/PhoneFormat.js


+ 138 - 0
static/src/js/phone_widget.js

@@ -0,0 +1,138 @@
+/* Base phone module for OpenERP
+   Copyright (C) 2013-2014 Alexis de Lattre <alexis@via.ecp.fr>
+   The licence is in the file __openerp__.py */
+
+openerp.base_phone = function (instance) {
+
+    var _t = instance.web._t;
+
+    instance.base_phone.FieldPhone = instance.web.form.FieldChar.extend({
+        template: 'FieldPhone',
+        initialize_content: function() {
+            this._super();
+            var $button = this.$el.find('button');
+            $button.click(this.on_button_clicked);
+            this.setupFocus($button);
+        },
+        render_value: function() {
+            if (!this.get('effective_readonly')) {
+                this._super();
+            } else {
+                var self = this;
+                var phone_num = this.get('value');
+                //console.log('BASE_PHONE phone_num = %s', phone_num);
+                var href = '#';
+                var href_text = '';
+                if (phone_num) {
+                  href = 'tel:' + phone_num;
+                  href_text = formatInternational('', phone_num) || '';
+                }
+                if (href_text) {
+                    this.$el.find('a.oe_form_uri').attr('href', href).text(href_text);
+                    this.$el.find('span.oe_form_char_content').text('');
+                } else {
+                    this.$el.find('a.oe_form_uri').attr('href', '').text('');
+                    this.$el.find('span.oe_form_char_content').text(phone_num || '');
+                }
+                var click2dial_text = '';
+                if (href_text && !this.options.dial_button_invisible) {
+                  click2dial_text = _t('Dial');
+                }
+                this.$el.find('#click2dial').off('click');
+                this.$el.find('#click2dial')
+                    .text(click2dial_text)
+                    .on('click', function(ev) {
+                        self.do_notify(
+                            _t('Click2dial started'),
+                            _t('Unhook your ringing phone'));
+                        var arg = {
+                            'phone_number': phone_num,
+                            'click2dial_model': self.view.dataset.model,
+                            'click2dial_id': self.view.datarecord.id};
+                        self.rpc('/base_phone/click2dial', arg).done(function(r) {
+                            //console.log('Click2dial r=%s', JSON.stringify(r));
+                            if (r === false) {
+                                self.do_warn("Click2dial failed");
+                            } else if (typeof r === 'object') {
+                                self.do_notify(
+                                    _t('Click2dial successfull'),
+                                    _t('Number dialed:') + ' ' + r.dialed_number);
+                                if (r.action_model) {
+                                    var context = {
+                                        'click2dial_model': self.view.dataset.model,
+                                        'click2dial_id': self.view.datarecord.id,
+                                        'phone_number': phone_num,
+                                        };
+                                    var action = {
+                                        name: r.action_name,
+                                        type: 'ir.actions.act_window',
+                                        res_model: r.action_model,
+                                        view_mode: 'form',
+                                        views: [[false, 'form']],
+                                        target: 'new',
+                                        context: context,
+                                        };
+                                    instance.client.action_manager.do_action(action);
+                                }
+                            }
+                        });
+                    });
+            }
+        },
+        on_button_clicked: function() {
+            location.href = 'tel:' + this.get('value');
+        }
+    });
+
+    instance.web.form.widgets.add('phone', 'instance.base_phone.FieldPhone');
+
+    instance.base_phone.FieldFax = instance.web.form.FieldChar.extend({
+        template: 'FieldFax',
+        initialize_content: function() {
+            this._super();
+            var $button = this.$el.find('button');
+            $button.click(this.on_button_clicked);
+            this.setupFocus($button);
+        },
+        render_value: function() {
+            if (!this.get('effective_readonly')) {
+                this._super();
+            } else {
+                var fax_num = this.get('value');
+                //console.log('BASE_PHONE fax_num = %s', fax_num);
+                var href = '#';
+                var href_text = '';
+                if (fax_num) {
+                    href = 'fax:' + fax_num;
+                    href_text = formatInternational('', fax_num) || '';
+                }
+                if (href_text) {
+                    this.$el.find('a.oe_form_uri').attr('href', href).text(href_text);
+                    this.$el.find('span.oe_form_char_content').text('');
+                } else {
+                    this.$el.find('a.oe_form_uri').attr('href', '').text('');
+                    this.$el.find('span.oe_form_char_content').text(fax_num || '');
+                }
+            }
+        },
+        on_button_clicked: function() {
+            location.href = 'fax:' + this.get('value');
+        }
+    });
+
+    instance.web.form.widgets.add('fax', 'instance.base_phone.FieldFax');
+
+    /* ability to add widget="phone" in TREE view */
+    var _super_list_char_format_ = instance.web.list.Char.prototype._format;
+    instance.web.list.Char.prototype._format = function(row_data, options) {
+        res = _super_list_char_format_.call(this, row_data, options);
+        var value = row_data[this.id].value;
+        if (value && this.widget === 'phone') {
+            readable_space = formatInternational('', value);
+            readable_no_break_space = readable_space.replace(/\s/g, ' ');
+            return readable_no_break_space;
+        }
+        return res;
+    };
+
+};

+ 54 - 0
static/src/xml/phone.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Base phone module for OpenERP
+    Copyright (C) 2013-2014 Alexis de Lattre <alexis@via.ecp.fr>
+    The licence is in the file __openerp__.py
+-->
+
+<templates id="template" xml:space="preserve">
+
+<t t-name="FieldPhone">
+    <span class="oe_form_field oe_form_field_email" t-att-style="widget.node.attrs.style">
+        <t t-if="widget.get('effective_readonly')">
+            <a href="#" class="oe_form_uri"/><span class="oe_form_char_content"/>
+            <!--
+            You should add the following "<a .. />" in your IPBX-specific
+            module (such as asterisk_click2dial or ovh_telephony_connector)
+            via <t t-extend="FieldPhone">
+            <a id="click2dial" href="#" class="oe_bold"/>
+            -->
+        </t>
+        <t t-if="!widget.get('effective_readonly')">
+            <div>
+                <input type="text"
+                    t-att-id="widget.id_for_label"
+                    t-att-tabindex="widget.node.attrs.tabindex"
+                    t-att-autofocus="widget.node.attrs.autofocus"
+                    t-att-placeholder="widget.node.attrs.placeholder"
+                    t-att-maxlength="widget.field.size"
+                />
+            </div>
+        </t>
+    </span>
+</t>
+
+<t t-name="FieldFax">
+    <span class="oe_form_field oe_form_field_email" t-att-style="widget.node.attrs.style">
+        <t t-if="widget.get('effective_readonly')">
+            <a href="#" class="oe_form_uri"/><span class="oe_form_char_content"/>
+        </t>
+        <t t-if="!widget.get('effective_readonly')">
+            <div>
+                <input type="text"
+                    t-att-id="widget.id_for_label"
+                    t-att-tabindex="widget.node.attrs.tabindex"
+                    t-att-autofocus="widget.node.attrs.autofocus"
+                    t-att-placeholder="widget.node.attrs.placeholder"
+                    t-att-maxlength="widget.field.size"
+                />
+            </div>
+        </t>
+    </span>
+</t>
+
+</templates>

+ 50 - 0
test/phonenum.yml

@@ -0,0 +1,50 @@
+-
+  Write country = FR for the main company
+-
+  !record {model: res.company, id: base.main_company}:
+    country_id: base.fr
+-
+  Write french phone numbers in national format
+-
+  !record {model: res.partner, id: partner1}:
+    name: Pierre Paillet
+    mobile: 06 42 77 42 66
+    fax: (0) 1 45 42 12 42
+-
+  Write swiss phone numbers in international format
+-
+  !record {model: res.partner, id: partner2}:
+    name: Joël Grand-Guillaume
+    parent_id: base.res_partner_12
+    phone: +41 21 619 10 10
+    mobile: +41 79 606 42 42
+-
+  Write invalid phone number
+-
+  !record {model: res.partner, id: partner3}:
+    name: Jean Badphone
+    phone: 42
+-
+  Check that valid phone numbers have been converted to E.164
+-
+  !python {model: res.partner}: |
+    partner1 = self.browse(cr, uid, ref('partner1'), context=context)
+    assert partner1.mobile == '+33642774266', 'Mobile number not written in E.164 format (partner1)'
+    assert partner1.fax == '+33145421242', 'Fax number not written in E.164 format (partner1)'
+    partner2 = self.browse(cr, uid, ref('partner2'), context=context)
+    assert partner2.phone == '+41216191010', 'Phone number not written in E.164 format (partner2)'
+    assert partner2.mobile == '+41796064242', 'Mobile number not written in E.164 format (partner2)'
+-
+  Check that invalid phone numbers are kept unchanged
+-
+  !python {model: res.partner}: |
+    partner3 = self.browse(cr, uid, ref('partner3'), context=context)
+    assert partner3.phone == '42', 'Invalid phone numbers should not be changed'
+-
+  Get name from phone number
+-
+  !python {model: phone.common}: |
+    name = self.get_name_from_phone_number(cr, uid, '0642774266')
+    assert name == 'Pierre Paillet', 'Wrong result for get_name_from_phone_number'
+    name2 = self.get_name_from_phone_number(cr, uid, '0041216191010')
+    assert name2 == u'Joël Grand-Guillaume (Camptocamp)', 'Wrong result for get_name_from_phone_number (partner2)'

+ 24 - 0
web_phone.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Base Phone module for OpenERP
+  Copyright (C) 2014 Alexis de Lattre <alexis@via.ecp.fr>
+  The licence is in the file __openerp__.py
+-->
+
+<openerp>
+<data>
+
+
+<template id="assets_backend" name="base_phone assets"
+          inherit_id="web.assets_backend">
+    <xpath expr="." position="inside">
+        <script type="text/javascript"
+            src="/base_phone/static/lib/phonenumbers/PhoneFormat.js"></script>
+        <script type="text/javascript"
+            src="/base_phone/static/src/js/phone_widget.js"></script>
+    </xpath>
+</template>
+
+
+</data>
+</openerp>

+ 23 - 0
wizard/__init__.py

@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Base Phone module for OpenERP
+#    Copyright (C) 2012-2014 Alexis de Lattre <alexis@via.ecp.fr>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from . import reformat_all_phonenumbers
+from . import number_not_found

BIN
wizard/__init__.pyc


+ 133 - 0
wizard/number_not_found.py

@@ -0,0 +1,133 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Base Phone module for Odoo
+#    Copyright (C) 2010-2015 Alexis de Lattre <alexis@via.ecp.fr>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp.osv import orm, fields
+from openerp.tools.translate import _
+import logging
+import phonenumbers
+
+_logger = logging.getLogger(__name__)
+
+
+class number_not_found(orm.TransientModel):
+    _name = "number.not.found"
+    _description = "Number not found"
+
+    _columns = {
+        'calling_number': fields.char(
+            'Calling Number', size=64, readonly=True,
+            help="Phone number of calling party that has been obtained "
+            "from the telephony server, in the format used by the "
+            "telephony server (not E.164)."),
+        'e164_number': fields.char(
+            'E.164 Number', size=64,
+            help="E.164 equivalent of the calling number."),
+        'number_type': fields.selection(
+            [('phone', 'Fixed'), ('mobile', 'Mobile')],
+            'Fixed/Mobile', required=True),
+        'to_update_partner_id': fields.many2one(
+            'res.partner', 'Partner to Update',
+            help="Partner on which the phone number will be written"),
+        'current_partner_phone': fields.related(
+            'to_update_partner_id', 'phone', type='char',
+            relation='res.partner', string='Current Phone', readonly=True),
+        'current_partner_mobile': fields.related(
+            'to_update_partner_id', 'mobile', type='char',
+            relation='res.partner', string='Current Mobile', readonly=True),
+        }
+
+    def default_get(self, cr, uid, fields_list, context=None):
+        res = super(number_not_found, self).default_get(
+            cr, uid, fields_list, context=context
+        )
+        if not res:
+            res = {}
+        if res.get('calling_number'):
+            convert = self.pool['res.partner']._generic_reformat_phonenumbers(
+                cr, uid, None, {'phone': res.get('calling_number')},
+                context=context)
+            parsed_num = phonenumbers.parse(convert.get('phone'))
+            res['e164_number'] = phonenumbers.format_number(
+                parsed_num, phonenumbers.PhoneNumberFormat.INTERNATIONAL)
+            number_type = phonenumbers.number_type(parsed_num)
+            if number_type == 1:
+                res['number_type'] = 'mobile'
+            else:
+                res['number_type'] = 'phone'
+        return res
+
+    def create_partner(self, cr, uid, ids, context=None):
+        '''Function called by the related button of the wizard'''
+        if context is None:
+            context = {}
+        wiz = self.browse(cr, uid, ids[0], context=context)
+        parsed_num = phonenumbers.parse(wiz.e164_number, None)
+        phonenumbers.number_type(parsed_num)
+
+        context['default_%s' % wiz.number_type] = wiz.e164_number
+        action = {
+            'name': _('Create New Partner'),
+            'view_mode': 'form,tree,kanban',
+            'res_model': 'res.partner',
+            'type': 'ir.actions.act_window',
+            'nodestroy': False,
+            'target': 'current',
+            'context': context,
+            }
+        return action
+
+    def update_partner(self, cr, uid, ids, context=None):
+        wiz = self.browse(cr, uid, ids[0], context=context)
+        if not wiz.to_update_partner_id:
+            raise orm.except_orm(
+                _('Error:'),
+                _("Select the Partner to Update."))
+        self.pool['res.partner'].write(
+            cr, uid, wiz.to_update_partner_id.id,
+            {wiz.number_type: wiz.e164_number}, context=context)
+        action = {
+            'name': _('Partner: %s' % wiz.to_update_partner_id.name),
+            'type': 'ir.actions.act_window',
+            'res_model': 'res.partner',
+            'view_mode': 'form,tree,kanban',
+            'nodestroy': False,
+            'target': 'current',
+            'res_id': wiz.to_update_partner_id.id,
+            'context': context,
+            }
+        return action
+
+    def onchange_to_update_partner(
+            self, cr, uid, ids, to_update_partner_id, context=None):
+        res = {'value': {}}
+        if to_update_partner_id:
+            to_update_partner = self.pool['res.partner'].browse(
+                cr, uid, to_update_partner_id, context=context)
+            res['value'].update({
+                'current_partner_phone': to_update_partner.phone,
+                'current_partner_mobile': to_update_partner.mobile,
+                })
+        else:
+            res['value'].update({
+                'current_partner_phone': False,
+                'current_partner_mobile': False,
+                })
+        return res

BIN
wizard/number_not_found.pyc


+ 54 - 0
wizard/number_not_found_view.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2012-2015 Alexis de Lattre <alexis@via.ecp.fr>
+  The licence is in the file __openerp__.py
+-->
+
+<openerp>
+<data>
+
+<record id="number_not_found_form" model="ir.ui.view">
+    <field name="name">number.not.found.form</field>
+    <field name="model">number.not.found</field>
+    <field name="arch" type="xml">
+        <form string="Number Not Found" version="7.0">
+            <div class="oe_title">
+                <label string="Number not found:" for="calling_number"/>
+                <h1>
+                    <field name="calling_number" />
+                </h1>
+                <label string="Number converted to international format:"
+                    for="e164_number"/>
+                <h2>
+                    <field name="e164_number" />
+                </h2>
+                <label for="number_type"/>
+                <h3>
+                    <field name="number_type"/>
+                </h3>
+            </div>
+            <group colspan="4" col="2" name="create-update">
+                <group name="partner" string="Create or Update a Partner"
+                    colspan="1" col="2">
+                    <button name="create_partner" class="oe_highlight" colspan="2"
+                        string="Create Partner with this Number" type="object"/>
+                    <field name="to_update_partner_id"
+                        on_change="onchange_to_update_partner(to_update_partner_id)"/>
+                    <field name="current_partner_phone" widget="phone"
+                        options="{'dial_button_invisible': True}"/>
+                    <field name="current_partner_mobile" widget="phone"
+                        options="{'dial_button_invisible': True}"/>
+                    <button name="update_partner" class="oe_highlight" colspan="2"
+                        string="Update Partner with this Number" type="object"/>
+                </group>
+            </group>
+            <footer>
+                <button special="cancel" string="Close" class="oe_link"/>
+            </footer>
+        </form>
+    </field>
+</record>
+
+
+</data>
+</openerp>

+ 103 - 0
wizard/reformat_all_phonenumbers.py

@@ -0,0 +1,103 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Base Phone module for Odoo
+#    Copyright (C) 2012-2015 Alexis de Lattre <alexis@via.ecp.fr>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp import models, fields
+import logging
+
+logger = logging.getLogger(__name__)
+
+
+class reformat_all_phonenumbers(models.TransientModel):
+    _name = "reformat.all.phonenumbers"
+    _inherit = "res.config.installer"
+    _description = "Reformat all phone numbers"
+
+    phonenumbers_not_reformatted = fields.Text(
+        string="Phone numbers that couldn't be reformatted")
+    state = fields.Selection([
+        ('draft', 'Draft'),
+        ('done', 'Done'),
+        ], string='State', default='draft')
+
+    def run_reformat_all_phonenumbers(self, cr, uid, ids, context=None):
+        logger.info('Starting to reformat all the phone numbers')
+        phonenumbers_not_reformatted = ''
+        phoneobjects = self.pool['phone.common']._get_phone_fields(
+            cr, uid, context=context)
+        ctx_raise = dict(context, raise_if_phone_parse_fails=True)
+        for objname in phoneobjects:
+            fields = self.pool[objname]._phone_fields
+            obj = self.pool[objname]
+            logger.info(
+                'Starting to reformat phone numbers on object %s '
+                '(fields = %s)' % (objname, fields))
+            # search if this object has an 'active' field
+            if obj._columns.get('active') or objname == 'hr.employee':
+                # hr.employee inherits from 'resource.resource' and
+                # 'resource.resource' has an active field
+                # As I don't know how to detect such cases, I hardcode it here
+                # If you know a better solution, please tell me
+                domain = ['|', ('active', '=', True), ('active', '=', False)]
+            else:
+                domain = []
+            all_ids = obj.search(cr, uid, domain, context=context)
+            for entry in obj.read(
+                    cr, uid, all_ids, fields, context=context):
+                init_entry = entry.copy()
+                # entry is _updated_ by the fonction
+                # _generic_reformat_phonenumbers()
+                try:
+                    obj._generic_reformat_phonenumbers(
+                        cr, uid, [entry['id']], entry, context=ctx_raise)
+                except Exception, e:
+                    name = obj.name_get(
+                        cr, uid, [init_entry['id']], context=context)[0][1]
+                    phonenumbers_not_reformatted += \
+                        "Problem on %s '%s'. Error message: %s\n" % (
+                            obj._description, name, unicode(e))
+                    logger.warning(
+                        "Problem on %s '%s'. Error message: %s" % (
+                            obj._description, name, unicode(e)))
+                    continue
+                if any(
+                        [init_entry.get(field) != entry.get(field) for
+                         field in fields]):
+                    entry.pop('id')
+                    logger.info(
+                        '[%s] Reformating phone number: FROM %s TO %s' % (
+                            obj._description, unicode(init_entry),
+                            unicode(entry)))
+                    obj.write(
+                        cr, uid, init_entry['id'], entry, context=context)
+        if not phonenumbers_not_reformatted:
+            phonenumbers_not_reformatted = \
+                'All phone numbers have been reformatted successfully.'
+        self.write(
+            cr, uid, ids[0], {
+                'phonenumbers_not_reformatted': phonenumbers_not_reformatted,
+                'state': 'done',
+                }, context=context)
+        logger.info('End of the phone number reformatting wizard')
+        action = self.pool['ir.actions.act_window'].for_xml_id(
+            cr, uid, 'base_phone', 'reformat_all_phonenumbers_action',
+            context=context)
+        action['res_id'] = ids[0]
+        return action

BIN
wizard/reformat_all_phonenumbers.pyc


+ 54 - 0
wizard/reformat_all_phonenumbers_view.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Base Phone module for OpenERP
+  Copyright (C) 2012-2013 Alexis de Lattre <alexis@via.ecp.fr>
+  The licence is in the file __openerp__.py
+-->
+
+<openerp>
+<data>
+
+<record id="reformat_all_phonenumbers_form" model="ir.ui.view">
+    <field name="name">reformat_all_phonenumbers.form</field>
+    <field name="model">reformat.all.phonenumbers</field>
+    <field name="arch" type="xml">
+        <form string="Reformat all phone numbers">
+            <group name="main">
+                <label string="This wizard reformats the phone, mobile and fax numbers of all partners in standard international format e.g. +33141981242" colspan="2" states="draft"/>
+                <label colspan="2" string="Phone numbers that couldn't be reformatted:" states="done"/>
+                <field name="phonenumbers_not_reformatted" colspan="2" nolabel="1" states="done"/>
+                <field name="state" invisible="1"/>
+            </group>
+            <footer>
+                <button name="run_reformat_all_phonenumbers"
+                    string="Reformat all phone numbers" type="object"
+                    class="oe_highlight" states="draft"/>
+                <button name="action_next" type="object" string="Close"
+                    class="oe_highlight" states="done"/>
+                <button special="cancel" string="Cancel"
+                    class="oe_link" states="draft"/>
+            </footer>
+        </form>
+    </field>
+</record>
+
+<record id="reformat_all_phonenumbers_action" model="ir.actions.act_window">
+    <field name="name">Reformat Phone Numbers</field>
+    <field name="res_model">reformat.all.phonenumbers</field>
+    <field name="view_mode">form</field>
+    <field name="target">new</field>
+</record>
+
+<!-- Menu entry under Settings > Technical -->
+<menuitem id="menu_config_phone" name="Telephony" parent="base.menu_custom"/>
+
+<menuitem id="reformat_all_phonenumbers_menu" action="reformat_all_phonenumbers_action" parent="menu_config_phone" sequence="100"/>
+
+<!-- Open the Reformat Phone Numbers wizard after the installation of the module -->
+<record id="reformat_all_phonenumbers_module_install" model="ir.actions.todo">
+    <field name="action_id" ref="reformat_all_phonenumbers_action"/>
+    <field name="type">automatic</field>
+</record>
+
+</data>
+</openerp>

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä