1
- < ?xml version="1.0" encoding="utf-8" ?>
2
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
2
< html xmlns ="http://www.w3.org/1999/xhtml " xml:lang ="en " lang ="en ">
4
3
< head >
5
4
< meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 " />
6
- < meta name ="generator " content ="Docutils: http ://docutils.sourceforge.net / " />
5
+ < meta name ="generator " content ="Docutils: https ://docutils.sourceforge.io / " />
7
6
< title > Dynamic Dropdown Widget</ title >
8
7
< style type ="text/css ">
9
8
10
9
/*
11
10
:Author: David Goodger (goodger@python.org)
12
- :Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
13
12
:Copyright: This stylesheet has been placed in the public domain.
14
13
15
14
Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
16
16
17
- See http ://docutils.sf.net /docs/howto/html-stylesheets.html for how to
17
+ See https ://docutils.sourceforge.io /docs/howto/html-stylesheets.html for how to
18
18
customize this style sheet.
19
19
*/
20
20
275
275
margin-left : 2em ;
276
276
margin-right : 2em }
277
277
278
- pre .code .ln { color : grey ; } /* line numbers */
278
+ pre .code .ln { color : gray ; } /* line numbers */
279
279
pre .code , code { background-color : # eeeeee }
280
280
pre .code .comment , code .comment { color : # 5C6576 }
281
281
pre .code .keyword , code .keyword { color : # 3B0D06 ; font-weight : bold }
301
301
span .pre {
302
302
white-space : pre }
303
303
304
- span .problematic {
304
+ span .problematic , pre . problematic {
305
305
color : red }
306
306
307
307
span .section-subtitle {
@@ -369,7 +369,7 @@ <h1 class="title">Dynamic Dropdown Widget</h1>
369
369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
370
!! source digest: sha256:e2b8eb236b4dc206f3a4ab9b5932f86c2e46c33bdac31c385725384f3fe970e3
371
371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
- < 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/16.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-16-0/web-16-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://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
372
+ < p > < a class ="reference external image-reference " 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 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.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/web/tree/16.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 image-reference " href ="https://translation.odoo-community.org/projects/web-16-0/web-16-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 image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
373
373
< p > Dynamic dropdown widget that supports resolving options from backend of:</ p >
374
374
< blockquote >
375
375
< ul class ="simple ">
@@ -384,61 +384,61 @@ <h1 class="title">Dynamic Dropdown Widget</h1>
384
384
< p > < strong > Table of contents</ strong > </ p >
385
385
< div class ="contents local topic " id ="contents ">
386
386
< ul class ="simple ">
387
- < li > < a class ="reference internal " href ="#usage " id ="id1 "> Usage</ a > </ li >
388
- < li > < a class ="reference internal " href ="#bug-tracker " id ="id2 "> Bug Tracker</ a > </ li >
389
- < li > < a class ="reference internal " href ="#credits " id ="id3 "> Credits</ a > < ul >
390
- < li > < a class ="reference internal " href ="#authors " id ="id4 "> Authors</ a > </ li >
391
- < li > < a class ="reference internal " href ="#contributors " id ="id5 "> Contributors</ a > </ li >
392
- < li > < a class ="reference internal " href ="#other-credits " id ="id6 "> Other credits</ a > </ li >
393
- < li > < a class ="reference internal " href ="#maintainers " id ="id7 "> Maintainers</ a > </ li >
387
+ < li > < a class ="reference internal " href ="#usage " id ="toc-entry-1 "> Usage</ a > </ li >
388
+ < li > < a class ="reference internal " href ="#bug-tracker " id ="toc-entry-2 "> Bug Tracker</ a > </ li >
389
+ < li > < a class ="reference internal " href ="#credits " id ="toc-entry-3 "> Credits</ a > < ul >
390
+ < li > < a class ="reference internal " href ="#authors " id ="toc-entry-4 "> Authors</ a > </ li >
391
+ < li > < a class ="reference internal " href ="#contributors " id ="toc-entry-5 "> Contributors</ a > </ li >
392
+ < li > < a class ="reference internal " href ="#other-credits " id ="toc-entry-6 "> Other credits</ a > </ li >
393
+ < li > < a class ="reference internal " href ="#maintainers " id ="toc-entry-7 "> Maintainers</ a > </ li >
394
394
</ ul >
395
395
</ li >
396
396
</ ul >
397
397
</ div >
398
398
< div class ="section " id ="usage ">
399
- < h1 > < a class ="toc-backref " href ="#id1 "> Usage</ a > </ h1 >
399
+ < h1 > < a class ="toc-backref " href ="#toc-entry-1 "> Usage</ a > </ h1 >
400
400
< pre class ="code python literal-block ">
401
- < span class ="nd "> @api</ span > < span class ="o "> .</ span > < span class ="n "> model</ span >
402
- < span class ="k "> def</ span > < span class ="nf "> method_name</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ):</ span >
403
- < span class ="n "> values</ span > < span class ="o "> =</ span > < span class ="p "> [</ span >
404
- < span class ="p "> (</ span > < span class ="s1 "> 'value_a'</ span > < span class ="p "> ,</ span > < span class ="s1 "> 'Title A'</ span > < span class ="p "> ),</ span >
405
- < span class ="p "> ]</ span >
406
- < span class ="k "> if</ span > < span class ="bp "> self</ span > < span class ="o "> .</ span > < span class ="n "> env</ span > < span class ="o "> .</ span > < span class ="n "> context</ span > < span class ="o "> .</ span > < span class ="n "> get</ span > < span class ="p "> (</ span > < span class ="s1 "> 'depending_on'</ span > < span class ="p "> )</ span > < span class ="o "> ==</ span > < span class ="kc "> True</ span > < span class ="p "> :</ span >
407
- < span class ="n "> values</ span > < span class ="o "> +=</ span > < span class ="p "> [</ span >
408
- < span class ="p "> (</ span > < span class ="s1 "> 'value_b'</ span > < span class ="p "> ,</ span > < span class ="s1 "> 'Title B'</ span > < span class ="p "> ),</ span >
409
- < span class ="p "> ]</ span >
410
- < span class ="k "> return</ span > < span class ="n "> values</ span >
401
+ < span class ="nd "> @api</ span > < span class ="o "> .</ span > < span class ="n "> model</ span > < span class =" w " >
402
+ </ span > < span class ="k "> def</ span > < span class ="nf "> method_name</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ):</ span > < span class =" w " >
403
+ </ span > < span class ="n "> values</ span > < span class ="o "> =</ span > < span class ="p "> [</ span > < span class =" w " >
404
+ </ span > < span class ="p "> (</ span > < span class ="s1 "> 'value_a'</ span > < span class ="p "> ,</ span > < span class ="s1 "> 'Title A'</ span > < span class ="p "> ),</ span > < span class =" w " >
405
+ </ span > < span class ="p "> ]</ span > < span class =" w " >
406
+ </ span > < span class ="k "> if</ span > < span class ="bp "> self</ span > < span class ="o "> .</ span > < span class ="n "> env</ span > < span class ="o "> .</ span > < span class ="n "> context</ span > < span class ="o "> .</ span > < span class ="n "> get</ span > < span class ="p "> (</ span > < span class ="s1 "> 'depending_on'</ span > < span class ="p "> )</ span > < span class ="o "> ==</ span > < span class ="kc "> True</ span > < span class ="p "> :</ span > < span class =" w " >
407
+ </ span > < span class ="n "> values</ span > < span class ="o "> +=</ span > < span class ="p "> [</ span > < span class =" w " >
408
+ </ span > < span class ="p "> (</ span > < span class ="s1 "> 'value_b'</ span > < span class ="p "> ,</ span > < span class ="s1 "> 'Title B'</ span > < span class ="p "> ),</ span > < span class =" w " >
409
+ </ span > < span class ="p "> ]</ span > < span class =" w " >
410
+ </ span > < span class ="k "> return</ span > < span class ="n "> values</ span >
411
411
</ pre >
412
412
< pre class ="code xml literal-block ">
413
- < span class ="nt "> <field</ span >
414
- < span class ="na "> name=</ span > < span class ="s "> "other_field"</ span >
415
- < span class ="nt "> /></ span >
416
- < span class ="nt "> <field</ span >
417
- < span class ="na "> name=</ span > < span class ="s "> "char_field"</ span >
418
- < span class ="na "> widget=</ span > < span class ="s "> "dynamic_dropdown"</ span >
419
- < span class ="na "> options=</ span > < span class ="s "> "{'values':'method_name'}"</ span >
420
- < span class ="na "> context=</ span > < span class ="s "> "{'depending_on': other_field}"</ span >
421
- < span class ="nt "> /></ span >
413
+ < span class ="nt "> <field</ span > < span class =" w " >
414
+ </ span > < span class ="na "> name=</ span > < span class ="s "> "other_field"</ span > < span class =" w " >
415
+ </ span > < span class ="nt "> /></ span > < span class =" w " >
416
+ </ span > < span class ="nt "> <field</ span > < span class =" w " >
417
+ </ span > < span class ="na "> name=</ span > < span class ="s "> "char_field"</ span > < span class =" w " >
418
+ </ span > < span class ="na "> widget=</ span > < span class ="s "> "dynamic_dropdown"</ span > < span class =" w " >
419
+ </ span > < span class ="na "> options=</ span > < span class ="s "> "{'values':'method_name'}"</ span > < span class =" w " >
420
+ </ span > < span class ="na "> context=</ span > < span class ="s "> "{'depending_on': other_field}"</ span > < span class =" w " >
421
+ </ span > < span class ="nt "> /></ span >
422
422
</ pre >
423
423
</ div >
424
424
< div class ="section " id ="bug-tracker ">
425
- < h1 > < a class ="toc-backref " href ="#id2 "> Bug Tracker</ a > </ h1 >
425
+ < h1 > < a class ="toc-backref " href ="#toc-entry-2 "> Bug Tracker</ a > </ h1 >
426
426
< p > Bugs are tracked on < a class ="reference external " href ="https://github.com/OCA/web/issues "> GitHub Issues</ a > .
427
427
In case of trouble, please check there if your issue has already been reported.
428
428
If you spotted it first, help us to smash it by providing a detailed and welcomed
429
429
< a class ="reference external " href ="https://github.com/OCA/web/issues/new?body=module:%20web_widget_dropdown_dynamic%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior** "> feedback</ a > .</ p >
430
430
< p > Do not contact contributors directly about support or help with technical issues.</ p >
431
431
</ div >
432
432
< div class ="section " id ="credits ">
433
- < h1 > < a class ="toc-backref " href ="#id3 "> Credits</ a > </ h1 >
433
+ < h1 > < a class ="toc-backref " href ="#toc-entry-3 "> Credits</ a > </ h1 >
434
434
< div class ="section " id ="authors ">
435
- < h2 > < a class ="toc-backref " href ="#id4 "> Authors</ a > </ h2 >
435
+ < h2 > < a class ="toc-backref " href ="#toc-entry-4 "> Authors</ a > </ h2 >
436
436
< ul class ="simple ">
437
437
< li > CorporateHub</ li >
438
438
</ ul >
439
439
</ div >
440
440
< div class ="section " id ="contributors ">
441
- < h2 > < a class ="toc-backref " href ="#id5 "> Contributors</ a > </ h2 >
441
+ < h2 > < a class ="toc-backref " href ="#toc-entry-5 "> Contributors</ a > </ h2 >
442
442
< ul >
443
443
< li > < p class ="first "> < a class ="reference external " href ="https://corporatehub.eu/ "> CorporateHub</ a > </ p >
444
444
< ul class ="simple ">
@@ -462,13 +462,15 @@ <h2><a class="toc-backref" href="#id5">Contributors</a></h2>
462
462
</ ul >
463
463
</ div >
464
464
< div class ="section " id ="other-credits ">
465
- < h2 > < a class ="toc-backref " href ="#id6 "> Other credits</ a > </ h2 >
465
+ < h2 > < a class ="toc-backref " href ="#toc-entry-6 "> Other credits</ a > </ h2 >
466
466
< p > The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp</ p >
467
467
</ div >
468
468
< div class ="section " id ="maintainers ">
469
- < h2 > < a class ="toc-backref " href ="#id7 "> Maintainers</ a > </ h2 >
469
+ < h2 > < a class ="toc-backref " href ="#toc-entry-7 "> Maintainers</ a > </ h2 >
470
470
< p > This module is maintained by the OCA.</ p >
471
- < a class ="reference external image-reference " href ="https://odoo-community.org "> < img alt ="Odoo Community Association " src ="https://odoo-community.org/logo.png " /> </ a >
471
+ < a class ="reference external image-reference " href ="https://odoo-community.org ">
472
+ < img alt ="Odoo Community Association " src ="https://odoo-community.org/logo.png " />
473
+ </ a >
472
474
< p > OCA, or the Odoo Community Association, is a nonprofit organization whose
473
475
mission is to support the collaborative development of Odoo features and
474
476
promote its widespread use.</ p >
0 commit comments