3
0
Fork 0

Merge PR #2604 into 15.0

Signed-off-by pedrobaeza
15.0-ocabot-merge-pr-2789-by-pedrobaeza-bump-patch
OCA-git-bot 2023-09-04 12:25:00 +00:00
commit 4b348e02fe
3 changed files with 4 additions and 1 deletions

View File

@ -10,6 +10,7 @@ const {Component} = owl;
const {xml} = owl.tags;
export const FakeMany2oneFieldWidget = FieldMany2One.extend(FieldManagerMixin, {
supportedFieldTypes: ["many2many", "many2one", "one2many"],
/**
* @override
*/

View File

@ -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);
},
/**

View File

@ -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"