Allow to select country in a dropdown
Project description
Snippet’s dropdown country code
This module adds a snippet with a dropdown and an input text field, is a base for be inherited by others modules into an HTML form.
This can be inserted into form elements.
Usage
To extend this template you need to inherit country_dropdown template and to add you personal code.
The template have three input text:
no_country_field: Field without code country.
country_code_field: Field with only country code (read only)
complete_field: Field with the previous two joined (hidden)
The name of the complete field is customizable when user insert the snippet into a form element with the website editor.
Development
You can call the reusable Qweb template called website_snippet_country_dropdown.country_dropdown in your views to add a sensible country-combined field, ideal for VATs.
The default country will be the first match among:
Extract it from the default_country variable.
Extract it from the first 2 letters of the default_value variable.
The current user’s country.
The current website’s company’s country.
The first country in the list.
You can view an example in https://github.com/OCA/e-commerce/tree/8.0/website_sale_checkout_country_vat.
Known issues / Roadmap
Add tests.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Credits
Images
Odoo Community Association: Icon.
Contributors
Sergio Teruel <sergio.teruel@tecnativa.com>
Maintainer
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file odoo8_addon_website_snippet_country_dropdown-8.0.1.1.0.99.dev6-py2-none-any.whl
.
File metadata
- Download URL: odoo8_addon_website_snippet_country_dropdown-8.0.1.1.0.99.dev6-py2-none-any.whl
- Upload date:
- Size: 33.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fd1526ecd61cee3830eec6a512766d3b75e49749e12ceba48ce4c1b01f36fe4 |
|
MD5 | cdfe507264f7fa7dc7179c176deca08d |
|
BLAKE2b-256 | 366b10d1249489056349f32129ecd9377b7f83a6f92e345b9c8fcc073cb64832 |