[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>
This commit is contained in:
Siddarth Gajjar
2018-05-30 15:39:15 +02:00
committed by Thibault Delavallée
co-authored by Mohammed Shekha
parent cda8bdc8b3
commit c75c2fa9e3
6 changed files with 179 additions and 0 deletions
+10
View File
@@ -1756,6 +1756,16 @@ Relational fields
<field name="recommended_activity_type_id" widget="radio"
options="{'horizontal':true}"/>
- selection_badge (FieldSelectionBadge)
This is a subfield of FieldSelection, but specialized to display all the
valid choices as rectangular badges.
- Supported field types: *selection, many2one*
.. code-block:: xml
<field name="recommended_activity_type_id" widget="selection_badge"/>
- many2one (FieldMany2One)
Default widget for many2one fields.