对于下面的功能,我得到了
的错误line 499, in export_xls
datas['form'] = self.read(['start_date', 'end_date'])[0]
代码是:
@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)
我正在从odoo 11中获取库存报告。为此,我创建了一个向导并传递值。现在错误来了。