[FIX] account invoice_print: ensure the right ids are in the context before calling get_action

bzr revid: sle@openerp.com-20140404151112-bov5xziw7rst1qtc
This commit is contained in:
Simon Lejeune 2014-04-04 17:11:12 +02:00
parent a5cd23baed
commit f0fe7aa177
1 changed files with 3 additions and 1 deletions

View File

@ -409,7 +409,9 @@ class account_invoice(osv.osv):
'''
assert len(ids) == 1, 'This option should only be used for a single id at a time.'
self.write(cr, uid, ids, {'sent': True}, context=context)
return self.pool['report'].get_action(cr, uid, ids, 'account.report_invoice', context=context)
context2 = context.copy()
context2['active_ids'] = ids
return self.pool['report'].get_action(cr, uid, [], 'account.report_invoice', context=context2)
def action_invoice_sent(self, cr, uid, ids, context=None):
'''