From d43d1ea2709bef08bc031f34b221164a7668f3ab Mon Sep 17 00:00:00 2001 From: Sonny V Date: Thu, 30 Apr 2015 14:08:18 +0200 Subject: [PATCH 1/2] [ADD] Added field in view for sequence in images --- views/product_images.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/views/product_images.xml b/views/product_images.xml index 1cae8d0..e46c9c2 100644 --- a/views/product_images.xml +++ b/views/product_images.xml @@ -9,6 +9,7 @@ + From b9f49d47be0db2bdf83f6c2e87fcce4d16783534 Mon Sep 17 00:00:00 2001 From: Sonny V Date: Thu, 30 Apr 2015 14:09:48 +0200 Subject: [PATCH 2/2] [ADD] Added field sequence_order with default 10 and _order on this field --- product_images.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/product_images.py b/product_images.py index 73ceb2e..587080d 100644 --- a/product_images.py +++ b/product_images.py @@ -2,6 +2,7 @@ class product_image(osv.Model): _name = 'product.image' + _order = 'sequence_edit' _columns = { 'name': fields.char('Name'), @@ -10,6 +11,10 @@ class product_image(osv.Model): 'image': fields.binary('Image'), 'image_small': fields.binary('Small Image'), 'product_tmpl_id': fields.many2one('product.template', 'Product'), + 'sequence_edit': fields.integer(), + } + _defaults { + 'sequence_edit': 10, } product_image()