diff options
| author | Siddarth Gajjar <sga@odoo.com> | 2018-05-30 14:52:17 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2018-05-30 15:39:15 +0200 |
| commit | c75c2fa9e3da007f080a4d4691d83d4c29112b1f (patch) | |
| tree | 62c1a4e36ad59afce79d77bba3eeeed9ea9f36b7 /addons/web/static/src/xml | |
| parent | cda8bdc8b371429c7f88326a99cb5ebf6c446a1d (diff) | |
[IMP] web: add a badge based widget for selection fields
This commit introduces a new widget to be used for selection-based fields.
Valid choices are displayed using rectangular badges and not like the
standard list. This widget is valid for selection and many2one fields
like selection or radio widgets.
Co-authored-by: Siddarth Gajjar <sga@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 0debc65dc54..458e15dd2be 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -792,6 +792,13 @@ <label class="o_form_label" t-att-for="id"><t t-esc="value[1]"/></label> </div> </t> + +<t t-name="FieldSelectionBadge"> + <span t-foreach="values" t-as="value" t-attf-class="o_selection_badge #{value[0] == current_value ? 'active' : ''}" t-att-data-index="value_index"> + <t t-esc="value[1]"/> + </span> +</t> + <t t-name="FieldMany2One"> <t t-if="widget.mode === 'readonly'"> <a t-if="!widget.nodeOptions.no_open" class="o_form_uri" href="#"/> |
