Add product_image module

issue10545
review367221003
This commit is contained in:
Cédric Krier committed 2021-08-29 17:49:40 +02:00
1 parent 0a0cb76932
commit 3577d58e33
9 files changed
+55 -3

No files matched your search

+3 -1
View File
@@ -1,5 +1,7 @@
* Add web shop check box to product image
Version 6.0.0 - 2021-05-03
* Bug fixes (see mercurial logs for details)
Version 5.8.0 - 2020-11-02
* Initial release
* Initial release
+3
View File
@@ -26,3 +26,6 @@ def register():
web.Shop_Attribute,
product.Attribute,
module='web_shop', type_='model', depends=['product_attribute'])
Pool.register(
product.Image,
module='web_shop', type_='model', depends=['product_image'])
+6
View File
@@ -32,3 +32,9 @@ class Attribute(metaclass=PoolMeta):
web_shops = fields.Many2Many(
'web.shop-product.attribute', 'attribute', 'shop', "Web Shops",
help="The list of web shops on which the attribute is published.")
class Image(metaclass=PoolMeta):
__name__ = 'product.image'
web_shop = fields.Boolean("Web Shop")
+20
View File
@@ -23,4 +23,24 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">product_attribute_form</field>
</record>
</data>
<data depends="product_image">
<record model="ir.ui.view" id="product_image_view_list">
<field name="model">product.image</field>
<field name="inherit" ref="product_image.image_view_list"/>
<field name="name">product_image_list</field>
</record>
<record model="ir.ui.view" id="product_image_view_form">
<field name="model">product.image</field>
<field name="inherit" ref="product_image.image_view_form"/>
<field name="name">product_image_form</field>
</record>
<record model="ir.ui.view" id="product_image_view_list_form">
<field name="model">product.image</field>
<field name="inherit" ref="product_image.image_view_list_form"/>
<field name="name">product_image_form</field>
</record>
</data>
</tryton>
+4 -1
View File
@@ -66,7 +66,10 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('trytond_product_attribute')]
tests_require = [
get_require_version('trytond_product_attribute'),
get_require_version('trytond_product_image'),
]
dependency_links = []
if minor_version % 2:
dependency_links.append(
+1 -1
View File
@@ -13,7 +13,7 @@ from trytond.modules.company.tests import CompanyTestMixin
class WebShopTestCase(CompanyTestMixin, ModuleTestCase):
'Test Web Shop module'
module = 'web_shop'
extras = ['product_attribute']
extras = ['product_attribute', 'product_image']
def suite():
+1
View File
@@ -11,6 +11,7 @@ depends:
web_user
extras_depend:
product_attribute
product_image
xml:
web.xml
product.xml
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="//group[@id='checkboxes']" position="inside">
<label name="web_shop"/>
<field name="web_shop" xexpand="0" width="25"/>
</xpath>
</data>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="//field[@name='product']" position="after">
<field name="web_shop"/>
</xpath>
</data>