Skip to content

Commit

Permalink
[MIG] fs_product_multi_image: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenminhchien committed Apr 26, 2024
1 parent f7d0410 commit 2425b68
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 15 deletions.
2 changes: 2 additions & 0 deletions fs_product_multi_image/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ Contributors

- Iván Todorovich <ivan.todorovich@gmail.com>

- Nguyen Minh Chien <chien@trobz.com>

Maintainers
-----------

Expand Down
2 changes: 1 addition & 1 deletion fs_product_multi_image/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion fs_product_multi_image/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions fs_product_multi_image/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- Quentin Groulard \<<quentin.groulard@acsone.eu>\>
- [Camptocamp](https://www.camptocamp.com)
- Iván Todorovich \<<ivan.todorovich@gmail.com>\>
- Nguyen Minh Chien \<<chien@trobz.com>\>
2 changes: 1 addition & 1 deletion fs_product_multi_image/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -451,6 +450,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<li>Iván Todorovich &lt;<a class="reference external" href="mailto:ivan.todorovich&#64;gmail.com">ivan.todorovich&#64;gmail.com</a>&gt;</li>
</ul>
</li>
<li>Nguyen Minh Chien &lt;<a class="reference external" href="mailto:chien&#64;trobz.com">chien&#64;trobz.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
2 changes: 1 addition & 1 deletion fs_product_multi_image/views/fs_product_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
</group>
</field>
Expand Down
31 changes: 20 additions & 11 deletions fs_product_multi_image/views/product_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,26 @@
</field>
<page name="sales" position="after">
<page name="images" string="Images">
<field name="image_ids" widget="fs_image_relation_dnd_upload">
<tree>
<field name="sequence" widget="handle" />
<field name="name" />
</tree>
</field>
<!-- field
name="image_ids"
mode="kanban"
widget="storage_image_handle"
/ -->
<group>
<group colspan="12">
<field
name="image_ids"
widget="fs_image_relation_dnd_upload"
nolabel="1"
colspan="2"
>
<tree>
<field name="sequence" widget="handle" />
<field name="name" />
</tree>
</field>
</group>
<!-- field
name="image_ids"
mode="kanban"
widget="storage_image_handle"
/ -->
</group>
</page>
</page>
</field>
Expand Down

0 comments on commit 2425b68

Please sign in to comment.