Search 1.9 billion lines of Odoo code on GitHub

web_widget_dropdown_dynamic

Author: CorporateHub, Odoo Community Association (OCA)
License: AGPL-3
Branch: 15.0
Repository: ACCOMODATA-BVBA/web
Dependencies: web
Languages: HTML (374, 49.4%), JavaScript (278, 36.7%), PO File (32, 4.2%), Python (20, 2.6%), and reStructuredText (53, 7.0%)
Other branches: 13.0, 13.0-Cleanup, and 15.0-PR2176
Other repositories: 001101/web-1, 965714601/web-1, AITIC/web, Abdulrahman3282/web, AlexandreDias23/web, Alfa-90/web, AntoniRomera/web, AyoubZahid/web, BADEP/web, BS-creator/web, BT-aestebanez/web, BT-nstuder/web, Bochelly/web, CB-Gran-Canaria/web, ChanFeei/web, Change2improve/web, ClancyQiao/web, ComitorDevTeam/web, Cy-Ghost/web, Daemo00/web, Dan-Stephen/web, Darknroses/web, Decikingship/web, Digital5-Odoo/web, DjamelEd/web, Dobtor-OCA/web, DudhatShivam/web, ELMARDI0107/web, ERPLibre/web, Ecnart/web, EdyKend/web, ElgatodeSchrodinger/web, ForgeFlow/web, GSLabIt/web, Gabinete-Digital/web, GlodoUK/oca-web, HirenDangar/web, HomerDeoDatu/web, Ingeos/web, Jarsa/web, JoanMarin/web, JohnmarkEnriquez/web, Jonathan-pr/web, KENLYLST/web, KKamaa/web, KonaERP/web, LevelPrime/web, Martronic-SA/web, MathBenTech/web, MaxyMoos/web, MeetKD/web, Meyjan/web, MicheleZak/web, MihranThalhath/web, MindAndGo/web, NL66278/web, NeatNerdPrime/web, Netsoro/web, NextERP-Romania/web, Nowheresly/web, OCA-MUK/web, OCA/web, PESOL/web, Paul98isep/web, Phaunswater/web, QubiQ/web, RLeeOSI/web, SanteLibre/web, Saul-Qiang2/web, SequarSrl/web, SerpentConsultingServices/web, SeuMarco/web, SimoRubi/web, SirumTME/web, SolutionSeekers/web, StefanRijnhart/web, Studio73/web, Syci-Consulting/web, TDu/web, TRESCLOUD/web, Tecnativa/web, VanMoof/web, Vauxoo/web, WilldooIT/web, aaltinisik/web, acsone/web, adhoc-dev/web, agrista/odoo-web, ahmedgenina/web, akloptim/web, akretion/web, alan80080/web, androettop/web, anhvu-sg/web, ansinaesmejor/web, antilhue/web, arkyalpyae/web, asphaltzipper/web, aurestic/web, bizzappdev/web, blooparksystems/web, bmya/web, boskowski/web, brain-tec/web, brian10048/web, bud-e/web, camptocamp/web, conandark/web, coopiteasy/web, cormaza/web, dani-xtendoo/web, denvian/web, diggy128/web, dingguijin/web, dndoanh/web, druidoo-dev/web, dvalladares66/web, dynapps/web, eLBati/web, ecosoft-odoo/web, edlwise/web, ehsu0407/web, eng-eslam-a-y/web, enmasys/web, essamcis/web, etobella/web, evansadji/web, exosoftware/oca-web, factorlibre/web, fallewi/web, farinoire/web, fjouatte/web, focusate/web-oca, foramaktiv/web, gab-net/web, gastonfeng/web, gfcapalbo/web, grindtildeath/web, gtorresemmanuel/web, hassanfadl/web, hbrunn/web, hiren-serpentcs/web, huntergps/web, i-vyshnevska/web, ibudgie/web, ideaspositivas-group/web, ilecyang/web, initOS/web, insscn/web, jacky82669513/web, jans23/web, janverb/web, jchanme/web, jeroen7s/web, jguerriat/web, jhonaelramos/web, josueBulle/web, kamasteve/web, karol1985/web, kejuswiss/web, khanvuthy88/web, kitworks-systems/web, kkasing11/web, kmee/web, kos94ok-3D/web, kurniawanlucky/web, leanhtuan1996/web, legalsylvain/web, lideritjnma/web, lilotter45/web, lincersolucoes/oca-web, lincoln6delta/web, liunux4odoo/web, loftwah/web, lubw/web, luisrodriguez-e2e/web, lweiming/web, magnuscolors/web, mashanz/web, mhadi12/web, mharenz/web, mingkongz/web, mochammadrizanaufal/web, modoolar/oca-web, mohamedhagag/web, moustafakhairy4/web, multidadosti-erp/web, munawirsyam/web, myonnet/oca-web, nawawi/OCA_web, netzweltmex/web, newtratip/web, nikhil150355/web, nikul-serpentcs/web, nilshamerlinck/web, niulinlnc/web, noorealam96/web, ob0420/web, odoogap/web, onurugur/web, onyanga/web, orlandosorio/web, osamaegypt/web, paraita/web, pegonzalezspesol/web, petrus-v/web, phuctranerp/web, pnajman-modoolar/web-1, popsolutions/web, praxigento/oca-web, presenceverte/web, qgzhiguo/web, quentingigon/web, raizs/web, redcor/web, richard-willdooit/web, ristecona/web, robertsvx27/web, rquintanam/web, rven/web, sahil-navadiya/web, samsagaz/web, sanjay-hercules/web, sanube/web, scottliu/web, sebalix/web, sergiocorato/web, sewisoft/web, sgheller/web, shiram/web, shurshilov/web-1, sinandurgut07/web, sodexis/web, solvosci/web, steingabelgaard/web, stevematos/web, stuti135/web, sudhir-erpharbor/web, sunflowerit/web, syci/web, szellmark20/web, takinobori/oca-web, tarteo/web, tegin/web, thoongnv/web, tirix/web, tirma-sa/web, tpa-odoo/web, trevi-software/web, trionoharjadi/web, trobz/web, tvtma/web, unitek-solusi/OCA-web, ursais/web, vasiljevicmarko/web, versada/web, vertelab/web, vialaurea/OCA-web, vnsofthe/web, wahello/oca-web, waveFuncjs/web, x0rzkov/odoo-web, xcgd/web, xiaoyi-yanqing/web, xtjie/web, y2gsmith/web, yanpierchirino/web, zarumaru/web, zcyuefan/web, zeroheure/web, and zeroincombenze/web

<h1 class="title">Dynamic Dropdown Widget</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_widget_dropdown_dynamic"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_widget_dropdown_dynamic"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>Dynamic dropdown widget that supports resolving options from backend of:</p> <blockquote> <ul class="simple"> <li><code>fields.Char</code></li> <li><code>fields.Integer</code></li> <li><code>fields.Selection</code></li> </ul> </blockquote> <p><strong>NOTE:</strong> This widget is not intended to <em>extend</em> <code>fields.Selection</code>, but to filter selection values. For fully-dynamic set of options, use <code>fields.Char</code> instead.</p> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#usage" id="id1">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id3">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id4">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li> </ul> </li> </ul> </div> <a name="usage"></a> <h2><a class="toc-backref" href="#id1">Usage</a></h2> <pre> <code lang="python">&#64;api.model def method_name(self): values = [ ('value_a', 'Title A'), ] if self.env.context.get('depending_on') == True: values += [ ('value_b', 'Title B'), ] return values</code> </pre> <pre> <code lang="xml">&lt;field name=&quot;other_field&quot; /&gt; &lt;field name=&quot;char_field&quot; widget=&quot;dynamic_dropdown&quot; values=&quot;method_name&quot; context=&quot;{'depending_on': other_field}&quot; /&gt;</code> </pre> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id2">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/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 <a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_dropdown_dynamic%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id3">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id4">Authors</a></h3> <ul class="simple"> <li>CorporateHub</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id5">Contributors</a></h3> <ul class="simple"> <li><a class="reference external" href="https://corporatehub.eu/">CorporateHub</a><ul> <li>Alexey Pelykh &lt;<a class="reference external" href="mailto:alexey.pelykh&#64;corphub.eu">alexey.pelykh&#64;corphub.eu</a>&gt;</li> </ul> </li> <li><a class="reference external" href="https://therp.nl/">Therp BV</a><ul> <li>Ronald Portier &lt;<a class="reference external" href="mailto:ronald&#64;therp.nl">ronald&#64;therp.nl</a>&gt;</li> </ul> </li> <li>Thanakrit Pintana &lt;<a class="reference external" href="mailto:thanakrit.p39&#64;gmail.com">thanakrit.p39&#64;gmail.com</a>&gt;</li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id6">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <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>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>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_widget_dropdown_dynamic">OCA/web</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>