Skip to content

Commit

Permalink
[IMP] base_multi_image: pre-commit execution
Browse files Browse the repository at this point in the history
  • Loading branch information
oerp-odoo committed Feb 14, 2025
1 parent 724afa6 commit 51dbbb8
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 93 deletions.
10 changes: 5 additions & 5 deletions base_multi_image/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Multiple images base
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/17.0/base_multi_image
:target: https://github.com/OCA/server-tools/tree/18.0/base_multi_image
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_multi_image
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-base_multi_image
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -128,7 +128,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_multi_image%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_multi_image%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand Down Expand Up @@ -180,6 +180,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/17.0/base_multi_image>`_ project on GitHub.
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/18.0/base_multi_image>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
6 changes: 3 additions & 3 deletions base_multi_image/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Multiple images base</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:60ac00ce7f687070232e6497bd0c97a20de9bcf45f9263960a3529ab63865636
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/17.0/base_multi_image"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_multi_image"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/18.0/base_multi_image"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-base_multi_image"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionality of any model to support multiple
images (a gallery) attached to it and allow you to manage them.</p>
<p><strong>Table of contents</strong></p>
Expand Down Expand Up @@ -478,7 +478,7 @@ <h1><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_multi_image%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_multi_image%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -525,7 +525,7 @@ <h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/17.0/base_multi_image">OCA/server-tools</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/18.0/base_multi_image">OCA/server-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
171 changes: 86 additions & 85 deletions base_multi_image/views/image_view.xml
Original file line number Diff line number Diff line change
@@ -1,120 +1,121 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

<record id="image_form_view" model="ir.ui.view">
<field name="name">Multi image form</field>
<field name="model">base_multi_image.image</field>
<field name="arch" type="xml">
<form string="Image">
<sheet>
<group>
<group string="Owner" invisible="show_technical == False">
<field name="show_technical" invisible="True" />
<field name="owner_model" />
<field name="owner_id" />
<field name="owner_ref_id" />
</group>
<group string="Image">
<field name="name" />
<field
<record id="image_form_view" model="ir.ui.view">
<field name="name">Multi image form</field>
<field name="model">base_multi_image.image</field>
<field name="arch" type="xml">
<form string="Image">
<sheet>
<group>
<group string="Owner" invisible="show_technical == False">
<field name="show_technical" invisible="True" />
<field name="owner_model" />
<field name="owner_id" />
<field name="owner_ref_id" />
</group>
<group string="Image">
<field name="name" />
<field
name="image_1920"
widget="image"
class="oe_avatar"
nolabel="1"
colspan="2"
options="{'preview_image': 'image_128'}"
/>
<field name="image_128" invisible="1" />
<field name="load_from" />
<field name="image_128" invisible="1" />
<field name="load_from" />
</group>
</group>
<group string="Options" name="option">
<field name="sequence" />
</group>
</group>
<group string="Options" name="option">
<field name="sequence" />
</group>
<group string="Comments">
<field name="comments" colspan="2" nolabel="1" />
</group>
</sheet>
</form>
</field>
</record>
<group string="Comments">
<field name="comments" colspan="2" nolabel="1" />
</group>
</sheet>
</form>
</field>
</record>

<record id="image_tree_view" model="ir.ui.view">
<field name="name">Multi image tree</field>
<field name="model">base_multi_image.image</field>
<field name="arch" type="xml">
<tree>
<field name="name" />
<field name="owner_model" />
<field name="owner_id" />
<field name="sequence" invisible="True" />
</tree>
</field>
</record>
<record id="image_tree_view" model="ir.ui.view">
<field name="name">Multi image tree</field>
<field name="model">base_multi_image.image</field>
<field name="arch" type="xml">
<tree>
<field name="name" />
<field name="owner_model" />
<field name="owner_id" />
<field name="sequence" invisible="True" />
</tree>
</field>
</record>

<record id="image_kanban_view" model="ir.ui.view">
<field name="name">Multi image kanban</field>
<field name="model">base_multi_image.image</field>
<field name="arch" type="xml">
<kanban string="Images">
<field name="id" />
<field name="name" />
<field name="sequence" />
<templates>
<t t-name="kanban-box">
<div style="position: relative">
<a
<record id="image_kanban_view" model="ir.ui.view">
<field name="name">Multi image kanban</field>
<field name="model">base_multi_image.image</field>
<field name="arch" type="xml">
<kanban string="Images">
<field name="id" />
<field name="name" />
<field name="sequence" />
<templates>
<t t-name="kanban-box">
<div style="position: relative">
<a
t-if="! read_only_mode"
type="delete"
style="position: absolute; right: 0; padding: 4px; diplay: inline-block"
>X</a>
<div class="oe_module_vignette">
<a type="open">
<img
<div class="oe_module_vignette">
<a type="open">
<img
t-att-alt="record.name"
t-att-src="kanban_image(
'base_multi_image.image',
'image_128',
record.id.raw_value)"
class="oe_kanban_image"
/>
</a>
<div class="oe_module_desc">
<div
</a>
<div class="oe_module_desc">
<div
class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border"
>
<table class="oe_kanban_table" name="main_table">
<tr>
<td
<table
class="oe_kanban_table"
name="main_table"
>
<tr>
<td
class="oe_kanban_title1"
align="left"
valign="middle"
>
<h4>
<a type="open">
<field name="name" />
</a>
</h4>
</td>
</tr>
</table>
<h4>
<a type="open">
<field name="name" />
</a>
</h4>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>

<record id="image_action" model="ir.actions.act_window">
<field name="name">Multi images</field>
<field name="res_model">base_multi_image.image</field>
<field name="view_mode">kanban,tree,form</field>
<field name="help">Click to add an image attached to an specific record.</field>
</record>
</t>
</templates>
</kanban>
</field>
</record>

<menuitem id="image_menu" action="image_action" parent="base.menu_custom" />
<record id="image_action" model="ir.actions.act_window">
<field name="name">Multi images</field>
<field name="res_model">base_multi_image.image</field>
<field name="view_mode">kanban,tree,form</field>
<field name="help">Click to add an image attached to an specific record.</field>
</record>

<menuitem id="image_menu" action="image_action" parent="base.menu_custom" />
</odoo>

0 comments on commit 51dbbb8

Please sign in to comment.