diff --git a/web_widget_one2many_product_picker/readme/CONFIGURE.rst b/web_widget_one2many_product_picker/readme/CONFIGURE.rst index e938b788d..46f18715d 100644 --- a/web_widget_one2many_product_picker/readme/CONFIGURE.rst +++ b/web_widget_one2many_product_picker/readme/CONFIGURE.rst @@ -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 diff --git a/web_widget_one2many_product_picker/readme/CONTRIBUTORS.rst b/web_widget_one2many_product_picker/readme/CONTRIBUTORS.rst index 150026f71..35d1357ea 100644 --- a/web_widget_one2many_product_picker/readme/CONTRIBUTORS.rst +++ b/web_widget_one2many_product_picker/readme/CONTRIBUTORS.rst @@ -3,3 +3,5 @@ * Alexandre D. Díaz * Pedro M. Baeza * David Vidal + +* Giovanni Serra diff --git a/web_widget_one2many_product_picker/static/src/js/widgets/field_one2many_product_picker.js b/web_widget_one2many_product_picker/static/src/js/widgets/field_one2many_product_picker.js index f92dd2a80..63697420b 100644 --- a/web_widget_one2many_product_picker/static/src/js/widgets/field_one2many_product_picker.js +++ b/web_widget_one2many_product_picker/static/src/js/widgets/field_one2many_product_picker.js @@ -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: [], }; },