From 3266d43399669484af990312d7f2699808928ebc Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 9 Feb 2016 11:25:26 +0100 Subject: [PATCH] [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 --- addons/marketing_campaign/marketing_campaign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index 6a6e3d8e9ad..0b77c35124b 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -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)