Repository
OCA/connector-telephony · module folder · Try on Runboat
Module version
1.0.0
Category
Phone
Folder size
0.8 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/connector-telephony
Last tracking update
2026-08-07 08:43:00
Authors
Akretion, Odoo Community Association (OCA)
Maintainers
Akretion, Odoo Community Association (OCA)
Committers
Weblate, OCA-git-bot, oca-ci, Bhavesh Heliconia, Heliconia Solutions
Odoo dependencies
Python dependencies
phonenumbers
System dependencies
None
Required by
None
Description
This module provides common methods and wizards which can be useful to
develop a connector between Odoo and a telephony system. It depends on
the official module *phone_validation* which handle the reformatting of
phone numbers using the
[phonenumbers](https://github.com/daviddrysdale/python-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](https://en.wikipedia.org/wiki/E.164) format
'+33155421242'. This module extends this reformatting to create() and
write() methods.

This module is used by the Odoo-Asterisk connector of the OCA.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
number_not_found_form number.not.found.form number.not.found form New
reformat_all_phonenumbers_form reformat_all_phonenumbers.form reformat.all.phonenumbers form New
res_config_settings_view_form base_phone.base.config.settings.form res.config.settings form Inherits base_setup.res_config_settings_view_form
view_users_form base_phone.res.users.telephony_tab res.users form Inherits base.view_users_form
view_users_form_simple_modif base_phone.user_preferences.view res.users form Inherits base.view_users_form_simple_modif
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (8)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (6)
  • calling_number Char
    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).' readonly=True size=64
  • current_partner_mobile Char
    related='to_update_partner_id.mobile' string='Current Mobile'
  • current_partner_phone Char
    related='to_update_partner_id.phone' string='Current Phone'
  • e164_number Char
    help='E.164 equivalent of the calling number.' size=64 string='E.164 Number'
  • number_type Selection
    required=True selection=[('phone', 'Fixed'), ('mobile', 'Mobile')] string='Fixed/Mobile'
  • to_update_partner_id Many2one → res.partner
    comodel_name='res.partner' help='Partner on which the phone number will be written' string='Partner to Update'
Public methods (3)
  • create_partner(self)
    Function called by the related button of the wizard
  • default_get(self, fields_list)
    @api.model
  • update_partner(self)
    Function called by the related button of the wizard

New fields (0)

No new fields.

Public methods (4)
  • click2dial(self, erp_number)
    @api.model
    This function is designed to be overridden in IPBX-specific modules, such as asterisk_click2dial or ovh_telephony_connector
  • convert_to_dial_number(self, erp_number)
    @api.model
    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.
  • get_name_from_phone_number(self, presented_number)
    @api.model
    Function to get name from phone number. Usefull for use from IPBX to add CallerID name to incoming calls.
  • get_record_from_phone_number(self, presented_number)
    @api.model
    If it finds something, it returns (object name, ID, record name) For example : ('res.partner', 42, 'Alexis de Lattre (Akretion)')

New fields (0)

No new fields.

Public methods (1)
  • phone_format(self, number, country=None, company=None)

New fields (2)
  • phonenumbers_not_reformatted Text
    string="Phone numbers that couldn't be reformatted"
  • state Selection
    default='draft' args: [('draft', 'Draft'), ('done', 'Done')]
Public methods (1)
  • run_reformat_all_phonenumbers(self)

New fields (1)
  • number_of_digits_to_match_from_end Integer
    default=8 help='In several situations, Odoo 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 Odoo is to try to match the end of the phone number in Odoo with the N last digits of the phone number presented by the calling party. N is the value you should enter in this field.' string='Number of Digits To Match From End'
Public methods (0)

No public methods.

New fields (1)
  • number_of_digits_to_match_from_end Integer
    readonly=False related='company_id.number_of_digits_to_match_from_end' string='Number of Digits'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…