[FIX] calendar: correct search on mail.message and ir.attachment
Handle the case of immutable (tuple) domain leafs.
This commit is contained in:
parent
d812175390
commit
7e51d98553
|
@ -1759,9 +1759,10 @@ class mail_message(osv.Model):
|
|||
'''
|
||||
convert the search on real ids in the case it was asked on virtual ids, then call super()
|
||||
'''
|
||||
args = list(args)
|
||||
for index in range(len(args)):
|
||||
if args[index][0] == "res_id" and isinstance(args[index][2], basestring):
|
||||
args[index][2] = get_real_ids(args[index][2])
|
||||
args[index] = (args[index][0], args[index][1], get_real_ids(args[index][2]))
|
||||
return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
|
||||
|
||||
def _find_allowed_model_wise(self, cr, uid, doc_model, doc_dict, context=None):
|
||||
|
@ -1781,9 +1782,10 @@ class ir_attachment(osv.Model):
|
|||
'''
|
||||
convert the search on real ids in the case it was asked on virtual ids, then call super()
|
||||
'''
|
||||
args = list(args)
|
||||
for index in range(len(args)):
|
||||
if args[index][0] == "res_id" and isinstance(args[index][2], basestring):
|
||||
args[index][2] = get_real_ids(args[index][2])
|
||||
args[index] = (args[index][0], args[index][1], get_real_ids(args[index][2]))
|
||||
return super(ir_attachment, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
|
|
Loading…
Reference in New Issue