[FIX] document: check method fails if it is called with an id instead of a list of ids
lp bug: https://launchpad.net/bugs/1225107 fixed bzr revid: carlos.vasquez@clearcorp.co.cr-20130913173912-h4oec41fwh9pg69f
This commit is contained in:
parent
0554984deb
commit
63159fee7b
|
@ -71,6 +71,10 @@ class document_file(osv.osv):
|
|||
def check(self, cr, uid, ids, mode, context=None, values=None):
|
||||
"""Overwrite check to verify access on directory to validate specifications of doc/access_permissions.rst"""
|
||||
super(document_file, self).check(cr, uid, ids, mode, context=context, values=values)
|
||||
|
||||
# write method can be called with either the ids list or an id, if the later is used, the ids received here will be a long variable.
|
||||
if not isinstance(ids, list):
|
||||
ids = [ids]
|
||||
if ids:
|
||||
self.pool.get('ir.model.access').check(cr, uid, 'document.directory', mode)
|
||||
|
||||
|
|
Loading…
Reference in New Issue