Search 1.9 billion lines of Odoo code on GitHub

website_snippet_country_dropdown

Author: Tecnativa, Odoo Community Association (OCA)
License: LGPL-3
Branch: _9.0-website_portal-merge_backports
Repository: Tecnativa/website
Dependencies: website
Languages: JavaScript (91, 16.7%), PO File (206, 37.7%), Python (23, 4.2%), Sass (13, 2.4%), XML (148, 27.1%), and reStructuredText (65, 11.9%)
Other branches: 10.0, 12.0, 12.0-fix-website_form_recaptcha-perms, 12.0-fix-website_megamenu-empty_dropdown, 12.0-imp-website_adv_image_optimization-select_image, 12.0-imp-website_snippet_country_dropdown-custom-input-classes, 12.0-mig-website_adv_image_optimization, 12.0-mig-website_logo, 12.0-website_blog_excerpt_img-rm_empty_images_block, 12.0-website_canonical_url-multirecord_check, 12.0-website_canonical_url-use_domain, 12.0-website_crm_quick_answer-fix_lang, 12.0-website_form_recaptcha-fix_load, 12.0-website_no_crawler-uninstallable, 12.0-website_snippet_anchor-fix_assets, 12.0-website_snippet_big_button-fix_nowrap, 13.0-MIG-website_snippet_country_dropdown, 13.0-add-website_snippet_timeline, 13.0-fix-website_cookiefirst-loading, 13.0-fix-website_crm_recaptcha-editor, 13.0-fw-fix-website_form_recaptcha-perms, 13.0-fw-port-c75cf895d941365e4bdf7dd3a6e1dc4e412aacdf, 13.0-mig-website_snippet_big_button, 13.0-mig-website_snippet_marginless_gallery, 14.0-dck-add-website_forum_subscription, 14.0-mig-website_crm_privacy_policy, 14.0-mig-website_membership_gamification, 14.0-mig-website_snippet_country_dropdown, 14.0-test, 15.0-ADD-website_form_require_legal, 15.0-FIX-website_legal_page, 15.0-MIG-website_legal_page, 15.0-MIG-website_snippet_country_dropdown, 15.0-mig-website_breadcrumb, 15.0-mig-website_cookiebot, 15.0-mig-website_snippet_big_button, 15.0-mig-website_snippet_marginless_gallery, 8.0, 9.0, 9.0-mig-website_disable_odoo, 9.0-website_portal_claim, 9.0-website_portal_invoice_separated, _8.0-esoc, _9.0-esoc, and website_blog_excerpt_img
Other repositories: 001101/website, 020cui/website, ADVALAKI/website-1, AEK-BKF/website, AITIC/website, AMhadhbi/website, AdvaitT17/website-1, Alex-Woo/website, Anon234/website, App-247/website, BenjaHe/website, BitStab/website, BoxInABox/website, CB-Gran-Canaria/website, Callino/website, Change2improve/website, ClearCorp/oca-website, Colorlessgold/website, CompassionCH/website, Comunitea/website, Confidere/website, CybroOdoo/website, Daemo00/website, DavidNitro/website, Djaitai/website, Dobtor-OCA/website, ELMARDI0107/website, Fitranugraha/website, ForgeFlow/website, Frank278/website, FreshSoftGit/website, Fuchur777/website, GabbasovDinar/website-1, Gabinete-Digital/website, Georgepanpan/website, Gofekra/website, GrupoAlvamex/website, HaTry/website, HammerSport-Marketing/website, Idealisconsulting/website, ImgBotApp/website-5, Ingeos/website, Jaquedeveloper/website, Jarsa/website, JayVora-SerpentCS/website, JazziMc/website, Jeisonpernia/website, Jokevil/website, JonathanOsAlc/website, KEVINYZY/website-1, KIKOU2016/website, Kazebayashi/website, Khwarizmiat/website, KolushovAlexandr/website, LaMachinerieDigitale/odoo_website_oca, LasLabs/website, LevelPrime/website, Logicasoft/FORK_website_OCA, MTantin/website, MadsackMediaStore/website, MathBenTech/website, MediaJockey/website, MisterTobi/website, NL66278/website, NaSol/website, NeatNerdPrime/website, NextERP-Romania/website, Nikul-Chaudhary/website, Nitrokey/odoo-website, Nowheresly/website, Numigi/odoo-website, OCA-MUK/website, OCA/website, ORETEK/website, OctoComputer/website, OpenPymeMx/website, OpusVL/website, OsoTranquilo/website, PCatinean/website, Palpid/website, PismennyiIgor/website, QANSEE/website, Rad0van/website, RealSolutionsLux/website, RedNeboa/website, Ricardlol/website, SalahAdDin/website, SanteLibre/website, Saran440/website, SequarSrl/website, SeuMarco/website, Shiraj-Nisus/website, SicurSam/website, Spearhead-Odoo/website, StefanRijnhart/website, StephanRozendaal/website, Studio73/website, SuzanaBhandari/website, Syci-Consulting/website, TRESCLOUD/website, TechspawnSolutions/website, VasiliyKorobatov/website, Vauxoo/website, VbossEkat/website-1, VisiionSolucionesTecnologicas/website, Xara77/website, XtremXpert/website, YevhenPechurin/website, YogeshMahera-SerpentCS/website, abakus-it/website, accnops/website, acsone/website, adhoc-dev/website, adr9/website, agenterp/website, agrista/odoo-website, ahilali/website, akhdaniel/website, akretion/website, amendoncabh/website, anandkansagra/website, angelmoya/website, anhchuyen/website, anhvu-sg/website, ansinaesmejor/website, antcto/website, antilhue/website, antonio-trey/website, apachesep/website, apetbiz/website, archetipo/website, aryajimbaran/website, aurestic/website, be-cloud-be/website, benwillig/website, bishalgit/website, bizople/website, bizzappdev/website, bjornbillen/website, brain-tec/website, bvkl/website, c-meier/website, camptocamp/website, chakhi/website, colmeirin/website, coopiteasy/website, corsisa/website, cristinamartinrod/website, crnd-inc/website, cubells/website, danztensai/website, daramousk/website, ddico/website, ddufresne/website, devRabbiz/website, devnsys/website, diegobgl/website, diggy128/website, dipendra-karki/website, don-systems/website, druidoo-dev/website, eLBati/website, edsnet/website, eezee-it/website, ehabqino/website, eil00l/website, emyu01/website, ericbbs/website, ernestotejeda/website, eslAmer/website, esosaja/website, eversatis/website, exosoftware/oca-website, ezdoo/website, fagist/website, faisalnoufal/website, fbpatel/website, firefly1994/website, flotho/website, focusate/website-oca, francoisdelarbre/website, gaanto/website, garrettcadams/website, gastonfeng/website, gbaumgartner-callino/website, gbrian/website-1, gfcapalbo/website, grant-thornton/website, gtg305/website, harked/website, haroldtamo/website, hbrunn/website, hgsoft/website, hilarak/website, hinfo506/website, hippe-67/website, hurrinico/website, iRichGit/website, iamyeonhan/website, iledarn/website, initOS/website, invitu/website, isoscl/website, ispan55/website, it-projects-llc/website, jacky82669513/website, jaleelpoovan/website, jansumanpan/website, jason156/website, jcarlosmontoya/website, jcchoquet/website, jop-odoo/website, josepmy/website, josugm/website, joyshmitz/website, jromeroarg/website-1, jsrhtc/website, jsviterig/website, jupiterzhuo/website, karan-dreambits/website, kardec-web/website-1, kenneth-vkd/website, keylor2906/website, khaeusler/website, khaks01/website, kmee/website, kryskool/website, l0wskilled/website, leangjia/website, leemannd/website, lfreeke/website, lideritjnma/website, lincersolucoes/oca-website, lpetkov-sw/website, mamaf/website, manaTec-GmbH/website, manawi/website, mettadipa/website, miguel-trey/website, mikevhe18/website, minhhq09/website, mmotahar/website, mobilizer/website, monksoftware/website, mpanarin/website, mrierav/website, nabiforks/website, nadiaafa/website, navri/website, necrodevz/website, nicolas-petit/website, nikul-serpentcs/website, nisheednair/website-1, njeudy/website, noorealam96/website, novacode-nl/website, ntsystemwork/oca-website, nuobit/website, odoo-etech/website, odoobgorg/OCA-website, odoogap/website, odoosoft/website, old-boy/website-1, onaconsulting/website, one2pret/website, onurugur/website, open-synergy/website, open2bizz/website, osfp-Pakistan/website, osiell/website, ossamagharib/website, ougc27/website, oxidos/website, parminder-chrishan/website, pedrocasi/website, pedroporras/website, petypi/website, popcomputadores-desenv/website, popsolutions/website, pratimedia/website, presenceverte/website, pscloud/website, pstisoluciones/website, py-web/website, pythoner-3k/website, raihansazal/website, raintao/website, ralnakar/website, ravishekharco/website, raycollazo/website, redblow/website, redcor/website, reinka/website, robertrottermann/website, rohitramnani1994/website, romugb/website, rossparks/website, royalline1/website-1, rruebner/website, rsullivan2704/website, saas-addons/website, sadeqamin/website, safecoms/website, sailguest/website, sanube/website, satriani-vai/website, savoirfairelinux/website, searro/website, serdareren/website, shiram/website, simahawk/website, simplifysolutions/website, smurf-U/website, sodexis/website, steingabelgaard/website, subteno-it/website, syci/website-odoo, syentys/website, tafaRU/website, takobi-online/website, tarteo/website, tbaden/website, techorg/website, thijshuijbers/website, thinkopensolutions/oca-website, thomas-willdooit/website, tirma-sa/website, torans/website, treytux/website, unitek-solusi/OCA-website, usmcgwg/website, valmarnet/website, vcloud9ray/website, vdedyukhin/website, vdewulf/website, versada/website, vidtsin/website, vijay-huang/website, vrajesh266/website, wahello/website, windev20/website, xumingzhi/website, y2gsmith/website, yaojiaqing/website, yaoxingqi/website-1, yassine-teoshore/website, yelizariev/website, yfjelley/website, youifki/website, yusniermatos/website, yveshoyos/website, zakoo20122/website, zeroincombenze/website, zhaohuaw/website, and zino974/website

<a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.svg"> </a> <a name="website-snippet-country-code-dropdown"></a> <h2>Website Snippet Country Code Dropdown</h2> <p>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.</p> <p>This can be inserted into form elements.</p> <a name="usage"></a> <h3>Usage</h3> <p>To extend this template you need to inherit <code>country_dropdown</code> template and add your personal code.</p> <p>The template have three input text:</p> <ol class="arabic simple"> <li><code>no_country_field</code>: Field without code country.</li> <li><code>country_code_field</code>: Field with only country code (read only)</li> <li><code>complete_field</code>: Field with the previous two joined (hidden)</li> </ol> <p>The name of the complete field is customizable when user insert the snippet into a form element with the website editor.</p> <a name="development"></a> <h3>Development</h3> <p>You can call the reusable Qweb template called <code>website_snippet_country_dropdown.country_dropdown</code> in your views to add a sensible country-combined field, ideal for <em>VATs</em>.</p> <p>The default country will be the first match among:</p> <ol class="arabic simple"> <li>Extract it from the <code>default_country</code> variable.</li> <li>Extract it from the first 2 letters of the <code>default_value</code> variable.</li> <li>The current user's country.</li> <li>The current website's company's country.</li> <li>The first country in the list.</li> </ol> <p>All variables you can use to modify its behavior:</p> <ul class="simple"> <li><code>complete_field</code> to give it a name. Usually it will match the field name.</li> <li><code>default_value</code> for the <code>complete_field</code>.</li> <li><code>countries</code> as a <code>res.country</code> ORM recordset.</li> <li><code>default_country</code> as a <code>res.country</code> record.</li> <li><code>no_country_placeholder</code>.</li> </ul> <p>You can view an example in <code>website_sale_checkout_country_vat</code> in OCA/e-commerce.</p> <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/186/9.0"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a> <a name="known-issues-roadmap"></a> <h3>Known issues / Roadmap</h3> <ul class="simple"> <li>Add tests.</li> <li>Flag images should be lazy-loaded to optimize loading.</li> <li>Snippet drag and drop <a class="reference external" href="https://github.com/OCA/website/pull/230#issuecomment-236681777">seems to be blocked by Odoo for some unknown reason.</a>. Given the main purpose of this module is to provide a reusable template for other modules to use, did not take the time to fix that use case.</li> </ul> <a name="bug-tracker"></a> <h3>Bug Tracker</h3> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/website/issues">GitHub Issues</a>. 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.</p> <a name="credits"></a> <h3>Credits</h3> <a name="images"></a> <h4>Images</h4> <ul class="simple"> <li>Odoo Community Association: <a class="reference external" href="https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg">Icon</a>.</li> </ul> <a name="contributors"></a> <h4>Contributors</h4> <ul class="simple"> <li>Sergio Teruel &lt;<a class="reference external" href="mailto:sergio.teruel&#64;tecnativa.com">sergio.teruel&#64;tecnativa.com</a>&gt;</li> <li>Jairo Llopis &lt;<a class="reference external" href="mailto:jairo.llopis&#64;tecnativa.com">jairo.llopis&#64;tecnativa.com</a>&gt;</li> </ul> <a name="maintainer"></a> <h4>Maintainer</h4> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>This module is maintained by the OCA.</p> <p>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.</p> <p>To contribute to this module, please visit <a class="reference external" href="https://odoo-community.org">https://odoo-community.org</a>.</p>