[IMP] web: make search panel display hex_color fields

This commit adds a colored ball in front of search panel categories
if the records have a `group_hex_color`

Task: #1974652

closes odoo/odoo#33842

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
This commit is contained in:
Thanh Dodeur
2019-06-04 08:07:22 +00:00
parent 9c5dde8c53
commit e0d354143b
2 changed files with 2 additions and 0 deletions
@@ -196,6 +196,7 @@ var SearchPanel = Widget.extend({
values: {},
tooltip: value.group_tooltip,
sequence: value.group_sequence,
hex_color: value.group_hex_color,
sortedValueIds: [],
};
// restore former checked and folded state
+1
View File
@@ -282,6 +282,7 @@
<input type="checkbox" t-att-id="inputId" t-att-checked="group.state === 'checked' ? 'checked' : undefined" class="custom-control-input"/>
<label t-att-for="inputId" class="o_search_panel_label custom-control-label d-block" t-att-title="group.tooltip">
<i t-att-class="'fa fa-fw pull-right o_toggle_fold ' + (group.folded ? 'fa-caret-left' : 'fa-caret-down')"/>
<span t-if="group.hex_color" t-att-style="'color: ' + group.hex_color + ';'">●</span>
<span class="o_search_panel_label_title"><t t-esc="group.name"/></span>
</label>
</div>