Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions product_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

class product_image(osv.Model):
_name = 'product.image'
_order = 'sequence_edit'

_columns = {
'name': fields.char('Name'),
Expand All @@ -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()

Expand Down
1 change: 1 addition & 0 deletions views/product_images.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<page string="Product Images">
<field name="images" context="{'default_name': name}">
<tree editable="bottom">
<field name="sequence_edit" widget="handle"/>
<field name="name"/>
<field name="description"/>
<field name="image_alt"/>
Expand Down