Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 186 |
Technical Name |
intl_tel_widget |
License | LGPL-3 |
Website | https://github.com/bkerdzaia/odoo_phone_intl/ |
Versions | 11.0 12.0 13.0 |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 186 |
Technical Name |
intl_tel_widget |
License | LGPL-3 |
Website | https://github.com/bkerdzaia/odoo_phone_intl/ |
Versions | 11.0 12.0 13.0 |
International Masked Telephone Input Widget
This module adds possibilities to change phone input mask based on country.
It supports different types of phone numbers and automatically validates phone on save.
This module is based on the International Telephone Input and jQuery Mask Plugin javascript libraries.

Usage
Widget Options
Widget has following options:
Option | Type | Default | Description |
---|---|---|---|
allow_dropdown | boolean | true | Whether or not allow country dial code selection dropdown. |
exclude_country_codes | array | [] | List of country codes to exclude in dropdown. |
only_country_codes | array | [] | Display only these country codes in dropdown. |
preferred_country_codes | array | [] | Preferable country codes that appear top in dropdown. |
phone_number_type | string | "MOBILE" | One of the following phone number types |
phone_number_format_type | string | "E164" | One of the following phone number formatting types |
separate_dial_code | boolean | true | Whether or not display dial code next to selected flag in dropdown. |
initial_country_code | string | undefined | Initialize country selection by specifying its country code. |
sync_country | boolean | true | Whether or not synchronize dropdown with country field change. |
country_field | string | "country_id" | Many2one res.country field name to synchronize with. Works when sync_country is true. |
Example
Example code:
<field name="phone" widget="phone_intl" options="{'only_country_codes': ['us', 'gb', 'ca', 'au'], 'country_field': 'country_id', 'separate_dial_code': True, 'initial_country_code': 'us'}"/>

Please log in to comment on this module