[IMP] web: ModelFieldSelector: allow to select a specific item

With this revision, we are now able to select a specific line item.
Useful especially in tests.

Part of task-id 2987871

X-original-commit: c8c7afc1e81c2e7de6b32de5db41d8f3d83a005c
Part-of: odoo/odoo#102688
This commit is contained in:
Pierre Rousseau
2022-10-07 19:45:12 +02:00
committed by Rémi Rahir
parent 60b49869c6
commit 19e5870dae
@@ -55,6 +55,7 @@
<t t-if="field.searchable and props.filter(field)">
<li
t-on-click="() => this.onFieldSelected({ ...field, name: fieldKey })"
t-att-data-name="fieldKey"
t-attf-class="o_field_selector_item #{fieldKey === currentActiveField and ' active' or ''}">
<t t-out="field.string" />
<div t-if="props.isDebugMode" class="text-muted o_field_selector_item_title"><t t-out="fieldKey"/> (<t t-out="field.type"/>)</div>