mirror of https://github.com/OCA/web.git
[12.0][IMP] web_widget_one2many_product_picker, add all_domain option
parent
d92fb0afc1
commit
7531cd57f4
|
@ -39,6 +39,7 @@ Widget options:
|
||||||
* show_discount > Enable/Disable display discount (False by default)
|
* show_discount > Enable/Disable display discount (False by default)
|
||||||
* show_subtotal > Enable/Disable show subtotal (True by default)
|
* show_subtotal > Enable/Disable show subtotal (True by default)
|
||||||
* auto_save > Enable/Disable auto save (False by default)
|
* auto_save > Enable/Disable auto save (False by default)
|
||||||
|
* all_domain > The domain used in 'All' section ([] by default)
|
||||||
|
|
||||||
If using auto save feature, you should keep in mind that the "Save" and "Discard" buttons
|
If using auto save feature, you should keep in mind that the "Save" and "Discard" buttons
|
||||||
will lose part of its functionality as the document will be saved every time you
|
will lose part of its functionality as the document will be saved every time you
|
||||||
|
|
|
@ -3,3 +3,5 @@
|
||||||
* Alexandre D. Díaz
|
* Alexandre D. Díaz
|
||||||
* Pedro M. Baeza
|
* Pedro M. Baeza
|
||||||
* David Vidal
|
* David Vidal
|
||||||
|
|
||||||
|
* Giovanni Serra <giovanni@gslab.it>
|
||||||
|
|
|
@ -85,9 +85,9 @@ odoo.define("web_widget_one2many_product_picker.FieldOne2ManyProductPicker", fun
|
||||||
|
|
||||||
// Uses to work with searchs, so we can mix properties with the user values.
|
// Uses to work with searchs, so we can mix properties with the user values.
|
||||||
this._searchContext = {
|
this._searchContext = {
|
||||||
domain: this.mode === "readonly" ? this._getLinesDomain() : false,
|
domain: this.mode === "readonly" ? this._getLinesDomain() : this._activeSearchGroup.domain,
|
||||||
text: false,
|
text: false,
|
||||||
order: false,
|
order: this.mode === "readonly" ? false : this._activeSearchGroup.order,
|
||||||
activeTest: true,
|
activeTest: true,
|
||||||
};
|
};
|
||||||
if (this.mode === "readonly") {
|
if (this.mode === "readonly") {
|
||||||
|
@ -206,7 +206,7 @@ odoo.define("web_widget_one2many_product_picker.FieldOne2ManyProductPicker", fun
|
||||||
this.searchGroups.splice(0, 0, {
|
this.searchGroups.splice(0, 0, {
|
||||||
name: 'all',
|
name: 'all',
|
||||||
string: _t("All"),
|
string: _t("All"),
|
||||||
domain: [],
|
domain: this.options.all_domain,
|
||||||
order: false,
|
order: false,
|
||||||
active: !hasUserActive,
|
active: !hasUserActive,
|
||||||
});
|
});
|
||||||
|
@ -456,6 +456,7 @@ odoo.define("web_widget_one2many_product_picker.FieldOne2ManyProductPicker", fun
|
||||||
trigger_refresh_fields: ["partner_id", "currency_id"],
|
trigger_refresh_fields: ["partner_id", "currency_id"],
|
||||||
auto_save: false,
|
auto_save: false,
|
||||||
ignore_warning: false,
|
ignore_warning: false,
|
||||||
|
all_domain: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue