Skip to content

Commit

Permalink
Merge PR #381 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by lmignon
  • Loading branch information
OCA-git-bot committed Jul 15, 2024
2 parents f4689c6 + 97f2e41 commit a17fc6e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
30 changes: 30 additions & 0 deletions fs_product_multi_image/views/fs_product_category_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,34 @@
</field>
</record>

<record model="ir.ui.view" id="fs_product_category_image_kanban_view">
<field name="name">fs.product.category.image.kanban</field>
<field name="model">fs.product.category.image</field>
<field
name="inherit_id"
ref="fs_base_multi_image.fs_image_relation_mixin_kanban_view"
/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//kanban/field[@name='image']">
<field name="tag_id" />
</xpath>
<xpath expr="//div[hasclass('o_kanban_image')]" position="inside">
<div class="o_kanban_image me-1">
<img
t-att-src="kanban_image('fs.product.category.image', 'image_medium', record.id.raw_value)"
t-if="record.id"
alt="Image"
class="o_image_64_contain"
/>
</div>
</xpath>
<xpath expr="//div[@name='extra']" position="after">
<div name="image_tag" class="mt-1">
<field name="tag_id" class="badge rounded-pill o_field_badge" />
</div>
</xpath>
</field>
</record>

</odoo>
11 changes: 7 additions & 4 deletions fs_product_multi_image/views/product_category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<field name="name">product.category.form</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view" />
<field name="priority" eval="99" />
<field name="arch" type="xml">
<div name="button_box" position="after">
<field
Expand All @@ -15,16 +16,18 @@
options="{'preview_image': 'image_medium', 'zoom': true}"
/>
</div>
<xpath expr="//group[last()]" position="after">
<xpath expr="//sheet" position="inside">
<group name="images" string="Images">
<field name="image_ids">
<field
name="image_ids"
mode="kanban"
widget="fs_image_relation_dnd_upload"
>
<tree>
<field name="sequence" widget="handle" />
<field name="name" />
</tree>
</field>
<!-- mode="kanban"
widget="storage_image_handle" -->
</group>
</xpath>
</field>
Expand Down

0 comments on commit a17fc6e

Please sign in to comment.