Browse Source

[MIG][9.0] base_multi_image

12.0-mig-module_prototyper_last
Atchuthan, Sodexis 9 years ago
committed by Vladislav Shepilov
parent
commit
d5ac82425f
  1. 7
      base_multi_image/README.rst
  2. 5
      base_multi_image/__openerp__.py
  3. 105
      base_multi_image/views/image_view.xml

7
base_multi_image/README.rst

@ -22,7 +22,7 @@ Usage
To manage all stored images, you need to: To manage all stored images, you need to:
* Go to *Settings > Configuration > Multi images*.
* Go to *Settings > Technical > Multi images*.
... but you probably prefer to manage them from the forms supplied by ... but you probably prefer to manage them from the forms supplied by
submodules that inherit this behavior. submodules that inherit this behavior.
@ -71,7 +71,7 @@ To develop a module based on this one:
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/8.0
:target: https://runbot.odoo-community.org/runbot/149/9.0
Known issues / Roadmap Known issues / Roadmap
====================== ======================
@ -90,7 +90,7 @@ help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/ <https://github.com/OCA/
server-tools/issues/new?body=module:%20 server-tools/issues/new?body=module:%20
base_multi_image%0Aversion:%20 base_multi_image%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits Credits
======= =======
@ -106,6 +106,7 @@ Contributors
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> * Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
* Rafael Blasco <rafabn@antiun.com> * Rafael Blasco <rafabn@antiun.com>
* Jairo Llopis <yajo.sk8@gmail.com> * Jairo Llopis <yajo.sk8@gmail.com>
* Sodexis <dev@sodexis.com>
Maintainer Maintainer
---------- ----------

5
base_multi_image/__openerp__.py

@ -2,14 +2,15 @@
# © 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) # © 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis # © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{ {
"name": "Multiple images base", "name": "Multiple images base",
"summary": "Allow multiple images for database objects", "summary": "Allow multiple images for database objects",
"version": "8.0.2.0.0",
"version": "9.0.1.0.0",
"author": "Serv. Tecnol. Avanzados - Pedro M. Baeza, " "author": "Serv. Tecnol. Avanzados - Pedro M. Baeza, "
"Antiun Ingeniería, S.L., "
"Antiun Ingeniería, S.L., Sodexis, "
"Odoo Community Association (OCA)", "Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",
"website": "http://www.antiun.com", "website": "http://www.antiun.com",

105
base_multi_image/views/image_view.xml

@ -7,59 +7,61 @@
<field name="model">base_multi_image.image</field> <field name="model">base_multi_image.image</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Image"> <form string="Image">
<group>
<group
string="Owner"
attrs="{
'invisible': [
('show_technical', '=', False),
],
}">
<field name="show_technical" invisible="True"/>
<field name="owner_model"/>
<field name="owner_id"/>
<field name="sequence"/>
</group>
<group string="Name">
<field name="name"/>
<field name="storage"/>
<field name="extension"/>
</group>
</group>
<group>
<group string="Options">
<field
name="url"
attrs="{
'invisible': [('storage', '!=', 'url')],
'required': [('storage', '=', 'url')],
}"
widget="url"/>
<field
name="path"
<sheet>
<group>
<group
string="Owner"
attrs="{ attrs="{
'invisible': [('storage', '!=', 'file')],
'required': [('storage', '=', 'file')],
}"/>
<field name="filename" invisible="1"/>
<field
name="file_db_store"
attrs="{
'invisible': [('storage', '!=', 'db')],
'required': [('storage', '=', 'db')],
}"
filename="filename"/>
'invisible': [
('show_technical', '=', False),
],
}">
<field name="show_technical" invisible="True"/>
<field name="owner_model"/>
<field name="owner_id"/>
<field name="sequence"/>
</group>
<group string="Name">
<field name="name"/>
<field name="storage"/>
<field name="extension"/>
</group>
</group>
<group>
<group string="Options">
<field
name="url"
attrs="{
'invisible': [('storage', '!=', 'url')],
'required': [('storage', '=', 'url')],
}"
widget="url"/>
<field
name="path"
attrs="{
'invisible': [('storage', '!=', 'file')],
'required': [('storage', '=', 'file')],
}"/>
<field name="filename" invisible="1"/>
<field
name="file_db_store"
attrs="{
'invisible': [('storage', '!=', 'db')],
'required': [('storage', '=', 'db')],
}"
filename="filename"/>
</group>
<group string="Preview">
<field name="image_medium"
widget="image"
readonly="True"
nolabel="1" />
</group>
</group> </group>
<group string="Preview">
<field name="image_medium"
widget="image"
readonly="True"
nolabel="1" />
<group string="Comments">
<field name="comments" nolabel="1" />
</group> </group>
</group>
<group string="Comments">
<field name="comments" nolabel="1" />
</group>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -131,12 +133,13 @@
<field name="name">Multi images</field> <field name="name">Multi images</field>
<field name="res_model">base_multi_image.image</field> <field name="res_model">base_multi_image.image</field>
<field name="view_mode">kanban,tree,form</field> <field name="view_mode">kanban,tree,form</field>
<field name="help">Click to add an image attached to an specific record.</field>
</record> </record>
<menuitem <menuitem
id="image_menu" id="image_menu"
action="image_action" action="image_action"
parent="base.menu_config"/>
parent="base.menu_custom"/>
</data> </data>
</openerp> </openerp>
Loading…
Cancel
Save