From 0543c48c56c46888c888dadded145626ef9247d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20D=2E=20D=C3=ADaz?= Date: Wed, 2 Jun 2021 14:48:07 +0200 Subject: [PATCH] [IMP] web_widget_one2many_product_picker: Control record per page by group and fix to two the number of decimals --- web_widget_one2many_product_picker/README.rst | 4 +- .../readme/CONFIGURE.rst | 4 +- .../static/description/index.html | 6 +- .../static/src/js/tools.js | 7 + .../js/views/One2ManyProductPicker/record.js | 61 +++++- .../views/One2ManyProductPicker/renderer.js | 32 ++- .../static/src/js/views/basic_controller.js | 27 ++- .../static/src/js/views/basic_model.js | 154 +++++++++++++-- .../widgets/field_one2many_product_picker.js | 182 ++++++++---------- .../src/xml/one2many_product_picker.xml | 2 +- 10 files changed, 325 insertions(+), 154 deletions(-) diff --git a/web_widget_one2many_product_picker/README.rst b/web_widget_one2many_product_picker/README.rst index 7f7e54dfa..10fb845f2 100644 --- a/web_widget_one2many_product_picker/README.rst +++ b/web_widget_one2many_product_picker/README.rst @@ -47,7 +47,6 @@ You need to define the view fields. The view must be of ``form`` type. Widget options: ~~~~~~~~~~~~~~~ -* product_per_page > Integer -> Used to control the load more behaviour (16 by default) * groups > Array of dictionaries -> Declare the groups * name -> The group name @@ -58,6 +57,9 @@ Widget options: * name -> The field name to order * asc -> Flag to use 'asc' order + * records_per_page > Integer -> Used to control the load more behaviour (16 by default) + * active -> Boolean -> Select the default group to use ('false' by default = 'All' group) + * currency_field > Model field used to format monetary values ('currency_id' by default) * field_map > Dictionary: diff --git a/web_widget_one2many_product_picker/readme/CONFIGURE.rst b/web_widget_one2many_product_picker/readme/CONFIGURE.rst index 984006746..9d6350245 100644 --- a/web_widget_one2many_product_picker/readme/CONFIGURE.rst +++ b/web_widget_one2many_product_picker/readme/CONFIGURE.rst @@ -5,7 +5,6 @@ You need to define the view fields. The view must be of ``form`` type. Widget options: ~~~~~~~~~~~~~~~ -* product_per_page > Integer -> Used to control the load more behaviour (16 by default) * groups > Array of dictionaries -> Declare the groups * name -> The group name @@ -16,6 +15,9 @@ Widget options: * name -> The field name to order * asc -> Flag to use 'asc' order + * records_per_page > Integer -> Used to control the load more behaviour (16 by default) + * active -> Boolean -> Select the default group to use ('false' by default = 'All' group) + * currency_field > Model field used to format monetary values ('currency_id' by default) * field_map > Dictionary: diff --git a/web_widget_one2many_product_picker/static/description/index.html b/web_widget_one2many_product_picker/static/description/index.html index 84b25088e..823f5446b 100644 --- a/web_widget_one2many_product_picker/static/description/index.html +++ b/web_widget_one2many_product_picker/static/description/index.html @@ -406,8 +406,6 @@ You need to define the view fields. The view must be of

Widget options: