Merge lp:~robertolizana/openobject-addons/product_images into lp:openobject-addons

Proposed by Roberto Lizana (trey.es)
Status: Rejected
Rejected by: Fabien (Open ERP)
Proposed branch: lp:~robertolizana/openobject-addons/product_images
Merge into: lp:openobject-addons
Diff against target: 349 lines (+317/-0)
6 files modified
__init__.py (+31/-0)
__terp__.py (+39/-0)
i18n/en_US.po (+74/-0)
i18n/es_ES.po (+74/-0)
product_image.py (+51/-0)
product_image_view.xml (+48/-0)
To merge this branch: bzr merge lp:~robertolizana/openobject-addons/product_images
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+30953@code.launchpad.net

Description of the change

Add tab images to product form. Each image have another fields: title, description and default. Only one image have default mark, this field is needed for show a image by default.

In origin this module is for e-commerce plataform (Magento, PrestaShop, eCommerce, etc..), but i think that is util for more issues.

To post a comment you must log in.
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

Hello,

I reject and propose you to add this module in extra-addons instead of addons.
Please note that you should use __openerp__.py instead of __terp__.py

PS: your module seems interresting.

Thanks for the contribution.

Unmerged revisions

1. By Roberto Lizana <treydo@RobertoLizana>

Initial import

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '__init__.py'
2--- __init__.py 1970-01-01 00:00:00 +0000
3+++ __init__.py 2010-07-26 14:28:51 +0000
4@@ -0,0 +1,31 @@
5+##############################################################################
6+#
7+# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
8+# Fabien Pinckaers <fp@tiny.Be>
9+# Copyright (c) 2008 ChriCar Beteilugungs- und Beratungs- GmbH All Rights Reserved.
10+# Ferdinand Gassauer <tiny@chricar.at>
11+#
12+# WARNING: This program as such is intended to be used by professional
13+# programmers who take the whole responsability of assessing all potential
14+# consequences resulting from its eventual inadequacies and bugs
15+# End users who are looking for a ready-to-use solution with commercial
16+# garantees and support are strongly adviced to contract a Free Software
17+# Service Company
18+#
19+# This program is Free Software; you can redistribute it and/or
20+# modify it under the terms of the GNU General Public License
21+# as published by the Free Software Foundation; either version 2
22+# of the License, or (at your option) any later version.
23+#
24+# This program is distributed in the hope that it will be useful,
25+# but WITHOUT ANY WARRANTY; without even the implied warranty of
26+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27+# GNU General Public License for more details.
28+#
29+# You should have received a copy of the GNU General Public License
30+# along with this program; if not, write to the Free Software
31+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32+#
33+##############################################################################
34+
35+import product_image
36\ No newline at end of file
37
38=== added file '__terp__.py'
39--- __terp__.py 1970-01-01 00:00:00 +0000
40+++ __terp__.py 2010-07-26 14:28:51 +0000
41@@ -0,0 +1,39 @@
42+# -*- encoding: utf-8 -*-
43+##############################################################################
44+#
45+# OpenERP, Open Source Management Solution
46+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
47+# $Id$
48+#
49+# This program is free software: you can redistribute it and/or modify
50+# it under the terms of the GNU General Public License as published by
51+# the Free Software Foundation, either version 3 of the License, or
52+# (at your option) any later version.
53+#
54+# This program is distributed in the hope that it will be useful,
55+# but WITHOUT ANY WARRANTY; without even the implied warranty of
56+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57+# GNU General Public License for more details.
58+#
59+# You should have received a copy of the GNU General Public License
60+# along with this program. If not, see <http://www.gnu.org/licenses/>.
61+#
62+##############################################################################
63+
64+
65+{
66+ 'name': 'Product images',
67+ 'version': '0.1',
68+ 'category': 'Tools',
69+ 'description': """One product more images.""",
70+ 'author': 'Trey (Roberto Lizana)',
71+ 'website': 'http://www.trey.es',
72+ 'depends': ['base','product'],
73+ 'init_xml': [],
74+ 'update_xml': [
75+ 'product_image_view.xml',
76+ ],
77+ 'demo_xml': [],
78+ 'installable': True,
79+}
80+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
81\ No newline at end of file
82
83=== added directory 'i18n'
84=== added file 'i18n/en_US.po'
85--- i18n/en_US.po 1970-01-01 00:00:00 +0000
86+++ i18n/en_US.po 2010-07-26 14:28:51 +0000
87@@ -0,0 +1,74 @@
88+# Translation of OpenERP Server.
89+# This file contains the translation of the following modules:
90+# * product_image
91+#
92+msgid ""
93+msgstr ""
94+"Project-Id-Version: OpenERP Server 5.0.6\n"
95+"Report-Msgid-Bugs-To: support@openerp.com\n"
96+"POT-Creation-Date: 2010-06-22 10:54:11+0000\n"
97+"PO-Revision-Date: 2010-06-22 10:54:11+0000\n"
98+"Last-Translator: <>\n"
99+"Language-Team: \n"
100+"MIME-Version: 1.0\n"
101+"Content-Type: text/plain; charset=UTF-8\n"
102+"Content-Transfer-Encoding: \n"
103+"Plural-Forms: \n"
104+
105+#. module: product_image
106+#: view:product.product:0
107+msgid "Images"
108+msgstr ""
109+
110+#. module: product_image
111+#: constraint:ir.ui.view:0
112+msgid "Invalid XML for View Architecture!"
113+msgstr ""
114+
115+#. module: product_image
116+#: constraint:ir.model:0
117+msgid "The Object name must start with x_ and not contain any special character !"
118+msgstr ""
119+
120+#. module: product_image
121+#: field:product_image.image,description:0
122+msgid "Description"
123+msgstr ""
124+
125+#. module: product_image
126+#: field:product_image.image,image:0
127+msgid "Image"
128+msgstr ""
129+
130+#. module: product_image
131+#: model:ir.module.module,shortdesc:product_image.module_meta_information
132+msgid "Product image"
133+msgstr ""
134+
135+#. module: product_image
136+#: field:product_image.image,product_id:0
137+msgid "Product"
138+msgstr ""
139+
140+#. module: product_image
141+#: model:ir.module.module,description:product_image.module_meta_information
142+msgid "One product more images."
143+msgstr ""
144+
145+#. module: product_image
146+#: model:ir.model,name:product_image.model_product_image_image
147+msgid "Images of a product"
148+msgstr ""
149+
150+#. module: product_image
151+#: field:product.product,product_image_id:0
152+#: view:product_image.image:0
153+msgid "Images"
154+msgstr ""
155+
156+#. module: product_image
157+#: view:product_image.image:0
158+#: field:product_image.image,notes:0
159+msgid "Notes"
160+msgstr ""
161+
162
163=== added file 'i18n/es_ES.po'
164--- i18n/es_ES.po 1970-01-01 00:00:00 +0000
165+++ i18n/es_ES.po 2010-07-26 14:28:51 +0000
166@@ -0,0 +1,74 @@
167+# Translation of OpenERP Server.
168+# This file contains the translation of the following modules:
169+# * product_image
170+#
171+msgid ""
172+msgstr ""
173+"Project-Id-Version: OpenERP Server 5.0.6\n"
174+"Report-Msgid-Bugs-To: support@openerp.com\n"
175+"POT-Creation-Date: 2010-06-22 10:53:14+0000\n"
176+"PO-Revision-Date: 2010-06-22 10:53:14+0000\n"
177+"Last-Translator: <>\n"
178+"Language-Team: \n"
179+"MIME-Version: 1.0\n"
180+"Content-Type: text/plain; charset=UTF-8\n"
181+"Content-Transfer-Encoding: \n"
182+"Plural-Forms: \n"
183+
184+#. module: product_image
185+#: view:product.product:0
186+msgid "Images"
187+msgstr "Imagenes"
188+
189+#. module: product_image
190+#: constraint:ir.ui.view:0
191+msgid "Invalid XML for View Architecture!"
192+msgstr "¡XML inválido para la definición de la vista!"
193+
194+#. module: product_image
195+#: constraint:ir.model:0
196+msgid "The Object name must start with x_ and not contain any special character !"
197+msgstr "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter especial!"
198+
199+#. module: product_image
200+#: field:product_image.image,description:0
201+msgid "Description"
202+msgstr "Descripcion"
203+
204+#. module: product_image
205+#: field:product_image.image,image:0
206+msgid "Image"
207+msgstr "Imagen"
208+
209+#. module: product_image
210+#: model:ir.module.module,shortdesc:product_image.module_meta_information
211+msgid "Product image"
212+msgstr "Imagen de producto"
213+
214+#. module: product_image
215+#: field:product_image.image,product_id:0
216+msgid "Product"
217+msgstr "Producto"
218+
219+#. module: product_image
220+#: model:ir.module.module,description:product_image.module_meta_information
221+msgid "One product more images."
222+msgstr "Varias imagenes para un producto."
223+
224+#. module: product_image
225+#: model:ir.model,name:product_image.model_product_image_image
226+msgid "Images of a product"
227+msgstr "Imagenes de un producto"
228+
229+#. module: product_image
230+#: field:product.product,product_image_id:0
231+#: view:product_image.image:0
232+msgid "Images"
233+msgstr "Imagenes"
234+
235+#. module: product_image
236+#: view:product_image.image:0
237+#: field:product_image.image,notes:0
238+msgid "Notes"
239+msgstr "Notas"
240+
241
242=== added file 'product_image.py'
243--- product_image.py 1970-01-01 00:00:00 +0000
244+++ product_image.py 2010-07-26 14:28:51 +0000
245@@ -0,0 +1,51 @@
246+# -*- encoding: utf-8 -*-
247+##############################################################################
248+#
249+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
250+#
251+# $Id: account.py 1005 2005-07-25 08:41:42Z nicoe $
252+#
253+# WARNING: This program as such is intended to be used by professional
254+# programmers who take the whole responsability of assessing all potential
255+# consequences resulting from its eventual inadequacies and bugs
256+# End users who are looking for a ready-to-use solution with commercial
257+# garantees and support are strongly adviced to contract a Free Software
258+# Service Company
259+#
260+# This program is Free Software; you can redistribute it and/or
261+# modify it under the terms of the GNU General Public License
262+# as published by the Free Software Foundation; either version 2
263+# of the License, or (at your option) any later version.
264+#
265+# This program is distributed in the hope that it will be useful,
266+# but WITHOUT ANY WARRANTY; without even the implied warranty of
267+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
268+# GNU General Public License for more details.
269+#
270+# You should have received a copy of the GNU General Public License
271+# along with this program; if not, write to the Free Software
272+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
273+#
274+##############################################################################
275+import netsvc
276+from osv import fields
277+from osv import osv
278+
279+class image(osv.osv):
280+ _name = "product_image.image"
281+ _description = "Images of a product"
282+ _columns = {
283+ 'description': fields.char('Description',size=255),
284+ 'image': fields.binary('Image'),
285+ 'notes': fields.text('Notes'),
286+ 'product_id': fields.many2one('product.product', 'Product'),
287+ }
288+image()
289+
290+class product_product(osv.osv):
291+ _inherit = "product.product"
292+ _columns = {
293+ 'product_image_id': fields.one2many('product_image.image', 'product_id','Images'),
294+ }
295+product_product()
296+
297
298=== added file 'product_image_view.xml'
299--- product_image_view.xml 1970-01-01 00:00:00 +0000
300+++ product_image_view.xml 2010-07-26 14:28:51 +0000
301@@ -0,0 +1,48 @@
302+<?xml version="1.0"?>
303+<openerp>
304+ <data>
305+ <!-- inherited product_product for new tab -->
306+ <record model="ir.ui.view" id="product_product_image_form">
307+ <field name="name">product.product.image.form</field>
308+ <field name="model">product.product</field>
309+ <field name="type">form</field>
310+ <field name="inherit_id" ref="product.product_normal_form_view"/>
311+ <field name="arch" type="xml">
312+ <notebook position="inside" >
313+ <page string="Images">
314+ <field name="product_image_id" nolabel="1"/>
315+ </page>
316+ </notebook>
317+ </field>
318+ </record>
319+
320+ <!-- product_product -->
321+ <record model="ir.ui.view" id="view_product_image_form">
322+ <field name="name">product_image.image.form</field>
323+ <field name="model">product_image.image</field>
324+ <field name="type">form</field>
325+ <field name="arch" type="xml">
326+ <form string="Images">
327+ <field name="description" select="1" colspan="4"/>
328+ <newline/>
329+ <field name="image" colspan="4" width="350" height="350" img_width="250" img_height="300" widget="image" nolabel="1"/>
330+ <separator colspan="4" string="Notes"/>
331+ <field name="notes" select="1" nolabel="1" colspan="4"/>
332+ </form>
333+ </field>
334+ </record>
335+
336+ <record model="ir.ui.view" id="view_product_image_tree">
337+ <field name="name">product_image.image.tree</field>
338+ <field name="model">product_image.image</field>
339+ <field name="type">tree</field>
340+ <field name="arch" type="xml">
341+ <tree string="Images">
342+ <field name="description"/>
343+ <field name="image"/>
344+ </tree>
345+ </field>
346+ </record>
347+
348+ </data>
349+</openerp>

Subscribers

People subscribed via source and target branches

to all changes: