Browse Source

[FIX] product_images_olbs: extra fixes + security. (manual commit after product_images_olbs import from 5.0 extra addons branch using "bzr replay")

pull/186/head
sharoonthomas 14 years ago
committed by sebastien beau
parent
commit
d8b14458aa
  1. 1
      product_images_olbs/__terp__.py
  2. 6
      product_images_olbs/product_images.py
  3. 2
      product_images_olbs/security/ir.model.access.csv

1
product_images_olbs/__terp__.py

@ -31,6 +31,7 @@
""",
"init_xml": [],
"update_xml": [
'security/ir.model.access.csv',
'views/product_images_view.xml',
],
"installable": True,

6
product_images_olbs/product_images.py

@ -43,10 +43,14 @@ class product_images(osv.osv):
_columns = {
'name':fields.char('Image Title', size=100, required=True),
'link':fields.boolean('Link?', help="Images can be linked from files on your file system or remote (Preferred)"),
'image':fields.binary('Image', filters='*.png,*.jpeg,*.gif'),
'image':fields.binary('Image', filters='*.png,*.jpg,*.gif'),
'filename':fields.char('File Location', size=250),
'preview':fields.function(_get_image, type="binary", method=True),
'comments':fields.text('Comments'),
'product_id':fields.many2one('product.product', 'Product')
}
_defaults = {
'link': lambda *a: True,
}
product_images()

2
product_images_olbs/security/ir.model.access.csv

@ -0,0 +1,2 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_product_images_olbs_product_images","product_images_olbs_product_images","model_product_images","product.group_product_manager",1,1,1,1
Loading…
Cancel
Save