Skip to content

Commit

Permalink
Merge PR #2604 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 4, 2023
2 parents 55183d2 + 7220ef4 commit 4b348e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions web_advanced_search/static/src/js/RecordPicker.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const {Component} = owl;
const {xml} = owl.tags;

export const FakeMany2oneFieldWidget = FieldMany2One.extend(FieldManagerMixin, {
supportedFieldTypes: ["many2many", "many2one", "one2many"],
/**
* @override
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
/**
Expand Down
2 changes: 1 addition & 1 deletion web_advanced_search/static/src/xml/CustomFilterItem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<t t-inherit="web.CustomFilterItem" t-inherit-mode="extension" owl="1">
<xpath expr="//select[@t-elif]" position="after">
<t
t-elif="fieldType === 'many2one' and ['=', '!='].includes(selectedOperator.symbol)"
t-elif="['many2one', 'many2many', 'one2many'].includes(fieldType) and ['=', '!='].includes(selectedOperator.symbol)"
>
<RecordPicker
model="fields[condition.field].relation"
Expand Down

0 comments on commit 4b348e0

Please sign in to comment.