Mooolto utile... sebbene inserendolo in report_invoice_document nella versione 10 riceva questo errore (ogni aiuto è apprezzato):
Traceback (most recent call last):
File "/opt/odoo/odoo-10.0/addons/report/controllers/main.py", line 96, in report_download
response = self.report_routes(reportname, docids=docids, converter='pdf')
File "/opt/odoo/odoo-10.0/odoo/http.py", line 504, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo-10.0/addons/report/controllers/main.py", line 45, in report_routes
pdf = report_obj.with_context(context).get_pdf(docids, reportname, data=data)
File "/opt/odoo/odoo-10.0/addons/report/models/report.py", line 165, in get_pdf
html = self.with_context(context).get_html(docids, report_name, data=data)
File "/opt/odoo/odoo-10.0/addons/report/models/report.py", line 139, in get_html
return self.render(report.report_name, docargs)
File "/opt/odoo/odoo-10.0/addons/report/models/report.py", line 115, in render
return view_obj.render_template(template, values)
File "/opt/odoo/odoo-10.0/odoo/addons/base/ir/ir_ui_view.py", line 1029, in render_template
return self.browse(self.get_view_id(template)).render(values, engine)
File "/opt/odoo/odoo-10.0/addons/website/models/ir_ui_view.py", line 110, in render
return super(View, self).render(values, engine=engine)
File "/opt/odoo/odoo-10.0/addons/web_editor/models/ir_ui_view.py", line 26, in render
return super(IrUiView, self).render(values=values, engine=engine)
File "/opt/odoo/odoo-10.0/odoo/addons/base/ir/ir_ui_view.py", line 1049, in render
return self.env[engine].render(self.id, qcontext)
File "/opt/odoo/odoo-10.0/odoo/addons/base/ir/ir_qweb/ir_qweb.py", line 53, in render
return super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
File "/opt/odoo/odoo-10.0/odoo/addons/base/ir/ir_qweb/qweb.py", line 248, in render
self.compile(template, options)(self, body.append, values or {})
File "/opt/odoo/odoo-10.0/odoo/addons/base/ir/ir_qweb/qweb.py", line 317, in _compiled_fn
raise e
QWebException: 'account.move' object has no attribute 'line_id'
Traceback (most recent call last):
File "/opt/odoo/odoo-10.0/odoo/addons/base/ir/ir_qweb/qweb.py", line 315, in _compiled_fn
return compiled(self, append, values, options, log)
File "<template>", line 1, in template_account_report_invoice_document_4299
File "<template>", line 3, in body_call_content_4298
AttributeError: 'account.move' object has no attribute 'line_id'
Error to render compiling AST
AttributeError: 'account.move' object has no attribute 'line_id'
Template: account.report_invoice_document
Path: /templates/t/t/div/div[4]/div/table/tbody/t
Node: <t t-foreach="o.move_id.line_id" t-as="pay">
<tr t-if="pay.debit > 0">
<td><span t-field="pay.date_maturity"/></td>
<td><span t-field="pay.debit"/></td>
</tr>
</t>