[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:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user