For the function which I wrote in a TransientModel I'm getting the below error:
line 499, in export_xls datas['form'] = self.read(['start_date', 'end_date'])[0]
The code is:
@api.multi def export_xls(self): context = self._context datas = {'ids': context.get('active_ids', [])} datas['model'] = 'wizard.stock.history' datas['form'] = self.read(['start_date', 'end_date'])[0] for field in datas['form'].keys(): if isinstance(datas['form'][field], tuple): datas['form'][field] = datas['form'][field] if context.get('xls_export'): return self.env.ref('product_category_report.stock_xlsx').report_action(self, data=datas)
I'm taking stock report from odoo 11. For that purpose I have created a wizard and passing values. Now the error comes like this.