OpenERP-QWeb报告
我正在Odoo(OpenERP)v.8上编写一个模块,以允许打印时间表。 我正在使用QWeb报表类型,但无法使用需要使用的字段 如果我从OpenERP-QWeb报告,openerp,qwebview,qweb,Openerp,Qwebview,Qweb,我正在Odoo(OpenERP)v.8上编写一个模块,以允许打印时间表。 我正在使用QWeb报表类型,但无法使用需要使用的字段 如果我从res_company模块调用一个字段,它将正常工作 <template id="report_timesheet_document"> <t t-call="report.external_layout"> <div class="page"> <div class="r
res_company
模块调用一个字段,它将正常工作
<template id="report_timesheet_document">
<t t-call="report.external_layout">
<div class="page">
<div class="row">
<div>
<span t-esc="res_company.name"/>
</div>
</div>
QWebException:“'NoneType'对象没有属性'date_from'”,而
评估“o.date\u from”
如果我使用t字段
<span t-field="o.date_from"/>
QWebException:“非类型”对象没有属性“\u所有\u列”
我该如何解决?谢谢。修复:
<template id="report_timesheet">
<t t-call="report.html_container">
<t t-foreach="doc_ids" t-as="doc_id">
<t t-raw="translate_doc(doc_id, doc_model, 'user_id.partner_id.lang', 'hr_timesheet_print.report_timesheet_document')"/>
</t>
</t>
</template>
<template id="report_timesheet">
<t t-call="report.html_container">
<t t-foreach="doc_ids" t-as="doc_id">
<t t-raw="translate_doc(doc_id, doc_model, 'user_id.partner_id.lang', 'hr_timesheet_print.report_timesheet_document')"/>
</t>
</t>
</template>