Base Phone
base_phone · OCA/connector-telephony
-
Security25/25No findings
-
Activity12/25Last human commit 20 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 11 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
ResCompany— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
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 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'. This module extends this reformatting to create() and write() methods.
This module is used by the Odoo-Asterisk connector of the OCA.
Dependencies
- Odoo dependencies
- Python dependencies
- phonenumbers
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 5
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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
No new fields.
Public methods (0)No public methods.
-
calling_numberCharhelp='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=Truesize=64 -
current_partner_mobileCharrelated='to_update_partner_id.mobile'string='Current Mobile' -
current_partner_phoneCharrelated='to_update_partner_id.phone'string='Current Phone' -
e164_numberCharhelp='E.164 equivalent of the calling number.'size=64string='E.164 Number' -
number_typeSelectionrequired=Trueselection=[('phone', 'Fixed'), ('mobile', 'Mobile')]string='Fixed/Mobile' -
to_update_partner_idMany2one → res.partnercomodel_name='res.partner'help='Partner on which the phone number will be written'string='Partner to Update'
-
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
No new fields.
Public methods (4)-
click2dial(self, erp_number)@api.modelThis 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.modelThis 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.modelFunction 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.modelIf it finds something, it returns (object name, ID, record name) For example : ('res.partner', 42, 'Alexis de Lattre (Akretion)')
No new fields.
Public methods (1)-
phone_format(self, number, country=None, company=None)
-
phonenumbers_not_reformattedTextstring="Phone numbers that couldn't be reformatted" -
stateSelectiondefault='draft' args: [('draft', 'Draft'), ('done', 'Done')]
-
run_reformat_all_phonenumbers(self)
-
number_of_digits_to_match_from_endIntegerdefault=8help='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'
No public methods.
-
number_of_digits_to_match_from_endIntegerreadonly=Falserelated='company_id.number_of_digits_to_match_from_end'string='Number of Digits'
No public methods.
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…