I'm using odoo8. I have a Transient Model used in a Dialog Form.
The view has a button:
<button name="summary_report" type="object" string="Invoice Summary"/>
summary_report is defined in the transient model: mil.sales_report
@api.one
def summary_report(self):
datas = {}
invoices = self.env['account.invoice'].search([
('company_id', '=', self.company_id.id)
])
context = dict({}, active_ids=invoices, active_model='account.invoice')
'''
datas = {
'ids':invoices,
'model':'account.invoice',
#'form':,
'context':self._context
}
'''
return {
'type': 'ir.actions.report.xml',
'report_name': 'mil_sales_report.invoice_summary_template',
'context': context
}
I am trying to query the account.invoice model and pass the results to report 'mil_sales_report.invoice_summary_template'.
When I press the button widow closes and nothing happens.