3
0
Fork 0

[IMP] web_widget_one2many_product_picker, add all_domain option

(cherry picked from commit 7531cd57f4)
13.0
Giovanni 2021-09-30 11:20:39 +02:00 committed by Alexandre D. Díaz
parent 7512c655bf
commit e3853b9ca4
3 changed files with 5 additions and 1 deletions

View File

@ -45,6 +45,7 @@ Widget options:
* show_subtotal > Enable/Disable show subtotal (True by default)
* auto_save > Enable/Disable auto save (False by default)
* auto_save_delay > The time (in milliseconds) to wait after the last interaction before launching the autosave (1500 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
will lose part of its functionality as the document will be saved every time you

View File

@ -3,3 +3,5 @@
* Alexandre D. Díaz
* Pedro M. Baeza
* David Vidal
* Giovanni Serra <giovanni@gslab.it>

View File

@ -285,7 +285,7 @@ odoo.define("web_widget_one2many_product_picker.FieldOne2ManyProductPicker", fun
this.searchGroups.splice(0, 0, {
name: "all",
string: _t("All"),
domain: [],
domain: this.options.all_domain,
order: false,
active: !hasUserActive,
records_per_page: 16,
@ -582,6 +582,7 @@ odoo.define("web_widget_one2many_product_picker.FieldOne2ManyProductPicker", fun
default_group: false,
auto_focus: true,
auto_save_delay: 1500,
all_domain: [],
};
},