[FIX] marketing_campaign: pass context as kwargs in overriden `search`
When converting a new API call to an old API call, the context is expected to be found within the kwargs argument. If not, it is seen as a regular argument. See `get_context_split` in `openerp/api.py` As it was not the case in the overidden method `search` in `marketing_campaign.py`, if a module overriden the method `search` of `ir.actions.report.xml` using the new API, the context wasn't treated as such correctly, and it leaded to wrong number of arguments passed. I take the opportunity to pass all arguments that are passed as kwargs in the base `search` as kwargs as well, to be clean. opw-668471
This commit is contained in:
parent
5763c32a6d
commit
3266d43399
|
@ -819,7 +819,7 @@ class report_xml(osv.osv):
|
|||
if object_id:
|
||||
model = self.pool.get('ir.model').browse(cr, uid, object_id, context=context).model
|
||||
args.append(('model', '=', model))
|
||||
return super(report_xml, self).search(cr, uid, args, offset, limit, order, context, count)
|
||||
return super(report_xml, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue