我试图从向导那里得到一份报告,我从我的回报中指向 mi res_model:stock.quant:
def print_report(self, cr, uid, ids, context=None):
datas = {'partner' : context.get('cliente'), 'mounth':context.get('mes')}
return {
'type': 'ir.actions.report.xml',
#~ 'report_file': 'stock.uas.wizard',
'report_name': 'stock.report_uas_document',
'report_type': 'qweb-html',
'datas': datas,
'context': context,
'res_model': 'stock.quant',
'src_model': 'stock.quant',
}
我正在获取正确的模型和报告,但是当您尝试使用某些字段时,我收到此错误:
QWebException: "'NoneType' object has no attribute 'get_pallets'" while evaluating
如果我尝试在模型中使用某些功能,我会收到此错误:
QWebException: ('MissingError', you'One of the documents you are trying to access has been deleted, please try again after refreshing.')
就像我在另一个没有名为 la that 的字段和函数的模型中一样。但是如果做
<span t-esc="o"/>
在报告中
y get: stock.quant(42,)
所以问题是,我怎样才能从回报中获取和消费参数。
我认为我在正确的对象中,我以传统方式及其单词构建此报告,但通过返回调用函数我没有通过参数。