Browse Source

[FIX] product_images_olbs : fix security rule and set the file path on the company optionnal

sebastien beau 12 years ago
parent
commit
987459d3b3
  1. 3
      product_images_olbs/company.py
  2. 2
      product_images_olbs/product_images.py
  3. 3
      product_images_olbs/security/ir.model.access.csv

3
product_images_olbs/company.py

@ -27,8 +27,7 @@ class ResCompany(osv.osv):
_columns = {
'local_media_repository':fields.char(
'Images Repository Path',
size=256,
required=True,
size=256,
help='Local mounted path on OpenERP server where all your images are stored.'
),
}

2
product_images_olbs/product_images.py

@ -140,7 +140,7 @@ class product_images(osv.osv):
'extention': fields.char('file extention', size=6),
'link':fields.boolean('Link?', help="Images can be linked from files on your file system or remote (Preferred)"),
'file_db_store':fields.binary('Image stored in database'),
'file':fields.function(_get_image, fnct_inv=_set_image, type="binary", method=True, filters='*.png,*.jpg,*.gif'),
'file':fields.function(_get_image, fnct_inv=_set_image, type="binary", filters='*.png,*.jpg,*.gif'),
'url':fields.char('File Location', size=250),
'comments':fields.text('Comments'),
'product_id':fields.many2one('product.product', 'Product')

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

@ -1,2 +1,3 @@
"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","base.group_sale_manager",1,1,1,1
"access_product_images_olbs_product_images","product_images_olbs_product_images","model_product_images","base.group_user",1,0,0,0
"access_product_images_olbs_product_images_manager","product_images_olbs_product_images","model_product_images","base.group_sale_manager",1,1,1,1
Loading…
Cancel
Save