forked from Techsystech/web
commit
8eb479fb3f
|
@ -31,6 +31,7 @@ patch(Dropdown.prototype, "dropdown", {
|
||||||
});
|
});
|
||||||
|
|
||||||
export const FakeMany2oneFieldWidget = FieldMany2One.extend(FieldManagerMixin, {
|
export const FakeMany2oneFieldWidget = FieldMany2One.extend(FieldManagerMixin, {
|
||||||
|
supportedFieldTypes: ["many2many", "many2one", "one2many"],
|
||||||
/**
|
/**
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -22,6 +22,8 @@ patch(CustomFilterItem.prototype, "web_advanced_search.legacy.CustomFilterItem",
|
||||||
async willStart() {
|
async willStart() {
|
||||||
this.OPERATORS.relational = this.OPERATORS.char;
|
this.OPERATORS.relational = this.OPERATORS.char;
|
||||||
this.FIELD_TYPES.many2one = "relational";
|
this.FIELD_TYPES.many2one = "relational";
|
||||||
|
this.FIELD_TYPES.many2many = "relational";
|
||||||
|
this.FIELD_TYPES.one2many = "relational";
|
||||||
return this._super(...arguments);
|
return this._super(...arguments);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<t t-inherit="web.CustomFilterItem" t-inherit-mode="extension" owl="1">
|
<t t-inherit="web.CustomFilterItem" t-inherit-mode="extension" owl="1">
|
||||||
<xpath expr="//select[@t-elif]" position="after">
|
<xpath expr="//select[@t-elif]" position="after">
|
||||||
<t
|
<t
|
||||||
t-elif="fieldType === 'many2one' and ['=', '!='].includes(selectedOperator.symbol)"
|
t-elif="['many2one', 'many2many', 'one2many'].includes(fieldType) and ['=', '!='].includes(selectedOperator.symbol)"
|
||||||
>
|
>
|
||||||
<RecordPicker
|
<RecordPicker
|
||||||
model="fields[condition.field].relation"
|
model="fields[condition.field].relation"
|
||||||
|
|
Loading…
Reference in New Issue