[FIX] ir, ir_attachement: traceback if try to create attachement without res_id, caused by check access rights trying to check if the user had the right to read the object with a res_id 0
bzr revid: dle@openerp.com-20131119140246-r8dd7h0di4aigjss
This commit is contained in:
parent
2c48cd977b
commit
b7988bcc5a
|
@ -198,7 +198,7 @@ class ir_attachment(osv.osv):
|
|||
continue
|
||||
res_ids.setdefault(rmod,set()).add(rid)
|
||||
if values:
|
||||
if values.get('res_model') and 'res_id' in values:
|
||||
if values.get('res_model') and values.get('res_id'):
|
||||
res_ids.setdefault(values['res_model'],set()).add(values['res_id'])
|
||||
|
||||
ima = self.pool.get('ir.model.access')
|
||||
|
|
Loading…
Reference in New Issue