[FIX] website: display website_published image without access to the model
Issue: if the user don't have any access to the model, _image method raise an exception instead of display the website_published images.
This commit is contained in:
parent
25b56671c1
commit
8a0b4ca39f
|
@ -535,6 +535,8 @@ class website(osv.osv):
|
|||
Model = self.pool[model]
|
||||
id = int(id)
|
||||
|
||||
ids = None
|
||||
if Model.check_access_rights(cr, uid, 'read', raise_exception=False):
|
||||
ids = Model.search(cr, uid,
|
||||
[('id', '=', id)], context=context)
|
||||
if not ids and 'website_published' in Model._fields:
|
||||
|
|
Loading…
Reference in New Issue