From 7220ef4709ca93d0fe71c00626f8dff8f7993102 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 1 Sep 2023 10:51:59 +0200 Subject: [PATCH] [FIX] web_advanced_search: recover support for m2m and o2m custom filter TT44862 --- web_advanced_search/static/src/js/RecordPicker.esm.js | 1 + .../static/src/js/legacy/CustomFilterItem.esm.js | 2 ++ web_advanced_search/static/src/xml/CustomFilterItem.xml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web_advanced_search/static/src/js/RecordPicker.esm.js b/web_advanced_search/static/src/js/RecordPicker.esm.js index 46fe53669d08..71de86a69e69 100644 --- a/web_advanced_search/static/src/js/RecordPicker.esm.js +++ b/web_advanced_search/static/src/js/RecordPicker.esm.js @@ -10,6 +10,7 @@ const {Component} = owl; const {xml} = owl.tags; export const FakeMany2oneFieldWidget = FieldMany2One.extend(FieldManagerMixin, { + supportedFieldTypes: ["many2many", "many2one", "one2many"], /** * @override */ diff --git a/web_advanced_search/static/src/js/legacy/CustomFilterItem.esm.js b/web_advanced_search/static/src/js/legacy/CustomFilterItem.esm.js index 8430ee63f9c6..46db3b4ce62f 100644 --- a/web_advanced_search/static/src/js/legacy/CustomFilterItem.esm.js +++ b/web_advanced_search/static/src/js/legacy/CustomFilterItem.esm.js @@ -22,6 +22,8 @@ patch(CustomFilterItem.prototype, "web_advanced_search.legacy.CustomFilterItem", async willStart() { this.OPERATORS.relational = this.OPERATORS.char; this.FIELD_TYPES.many2one = "relational"; + this.FIELD_TYPES.many2many = "relational"; + this.FIELD_TYPES.one2many = "relational"; return this._super(...arguments); }, /** diff --git a/web_advanced_search/static/src/xml/CustomFilterItem.xml b/web_advanced_search/static/src/xml/CustomFilterItem.xml index 30d0c7801024..dd29d6318f67 100644 --- a/web_advanced_search/static/src/xml/CustomFilterItem.xml +++ b/web_advanced_search/static/src/xml/CustomFilterItem.xml @@ -8,7 +8,7 @@