[FIX] web report: use get to find active_ids inside the context. Check if report_ids is defined
bzr revid: chm@openerp.com-20130708105425-p8279f00xa7925xh
This commit is contained in:
parent
67446c03c8
commit
e4aad29beb
|
@ -1676,13 +1676,15 @@ class Reports(http.Controller):
|
|||
context.update(action["context"])
|
||||
|
||||
report_data = {}
|
||||
report_ids = context["active_ids"]
|
||||
report_ids = context.get("active_ids", None)
|
||||
if 'report_type' in action:
|
||||
report_data['report_type'] = action['report_type']
|
||||
if 'datas' in action:
|
||||
if 'ids' in action['datas']:
|
||||
report_ids = action['datas'].pop('ids')
|
||||
report_data.update(action['datas'])
|
||||
if not report_ids:
|
||||
raise ValueError("action['datas']['ids'] and context['active_ids'] are undefined")
|
||||
|
||||
report_id = report_srv.report(
|
||||
request.session._db, request.session._uid, request.session._password,
|
||||
|
|
Loading…
Reference in New Issue