From 2425b681581b8ed364513997eff423658bf0f37c Mon Sep 17 00:00:00 2001 From: chien Date: Fri, 1 Mar 2024 15:23:42 +0700 Subject: [PATCH] [MIG] fs_product_multi_image: Migration to 17.0 --- fs_product_multi_image/README.rst | 2 ++ fs_product_multi_image/__manifest__.py | 2 +- .../models/product_product.py | 2 +- fs_product_multi_image/readme/CONTRIBUTORS.md | 1 + .../static/description/index.html | 2 +- .../views/fs_product_image.xml | 2 +- .../views/product_template.xml | 31 ++++++++++++------- 7 files changed, 27 insertions(+), 15 deletions(-) diff --git a/fs_product_multi_image/README.rst b/fs_product_multi_image/README.rst index e361d9ac62..be001ac278 100644 --- a/fs_product_multi_image/README.rst +++ b/fs_product_multi_image/README.rst @@ -104,6 +104,8 @@ Contributors - Iván Todorovich +- Nguyen Minh Chien + Maintainers ----------- diff --git a/fs_product_multi_image/__manifest__.py b/fs_product_multi_image/__manifest__.py index 58e12f3429..5babaf20dc 100644 --- a/fs_product_multi_image/__manifest__.py +++ b/fs_product_multi_image/__manifest__.py @@ -5,7 +5,7 @@ "name": "Fs Product Multi Image", "summary": """ Manage multi images from extenal file system on product""", - "version": "16.0.1.1.1", + "version": "17.0.1.0.0", "license": "AGPL-3", "author": "ACSONE SA/NV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/storage", diff --git a/fs_product_multi_image/models/product_product.py b/fs_product_multi_image/models/product_product.py index 12b6a9cf71..a4fbbef167 100644 --- a/fs_product_multi_image/models/product_product.py +++ b/fs_product_multi_image/models/product_product.py @@ -39,7 +39,7 @@ class ProductProduct(models.Model): def _compute_variant_image_ids(self): for variant in self: variant_image_ids = variant.image_ids.filtered( - lambda i: i._match_variant(variant) + lambda i, v=variant: i._match_variant(v) ) variant_image_ids = variant_image_ids.sorted( key=lambda i: (i.sequence, i.name) diff --git a/fs_product_multi_image/readme/CONTRIBUTORS.md b/fs_product_multi_image/readme/CONTRIBUTORS.md index b67df1469f..59ab62bb12 100644 --- a/fs_product_multi_image/readme/CONTRIBUTORS.md +++ b/fs_product_multi_image/readme/CONTRIBUTORS.md @@ -4,3 +4,4 @@ - Quentin Groulard \<\> - [Camptocamp](https://www.camptocamp.com) - Iván Todorovich \<\> +- Nguyen Minh Chien \<\> diff --git a/fs_product_multi_image/static/description/index.html b/fs_product_multi_image/static/description/index.html index 33031b6eda..dbd839cf31 100644 --- a/fs_product_multi_image/static/description/index.html +++ b/fs_product_multi_image/static/description/index.html @@ -1,4 +1,3 @@ - @@ -451,6 +450,7 @@

Contributors

  • Iván Todorovich <ivan.todorovich@gmail.com>
  • +
  • Nguyen Minh Chien <chien@trobz.com>
  • diff --git a/fs_product_multi_image/views/fs_product_image.xml b/fs_product_multi_image/views/fs_product_image.xml index 002e85635f..67c436b359 100644 --- a/fs_product_multi_image/views/fs_product_image.xml +++ b/fs_product_multi_image/views/fs_product_image.xml @@ -23,7 +23,7 @@ name="attribute_value_ids" widget="many2many_tags" domain="[('id', 'in', available_attribute_value_ids)]" - attrs="{'invisible': [('available_attribute_value_ids', '=', [])]}" + invisible="not available_attribute_value_ids" /> diff --git a/fs_product_multi_image/views/product_template.xml b/fs_product_multi_image/views/product_template.xml index b2af520227..98b4f0d2bf 100644 --- a/fs_product_multi_image/views/product_template.xml +++ b/fs_product_multi_image/views/product_template.xml @@ -20,17 +20,26 @@ - - - - - - - + + + + + + + + + + +