Hello all, I have scoured the forums and the web for 4 days looking for a solution and so far none. I cannot print any QWeb reports (Quotation or Invoice are the ones I've tried).
I CAN print PDF reports in accounting, it only fails when I use a window action to print something. I confirmed that wkhtmltopdf is working.
Here's what I've tried so far:
Updated web.base.url to use the https desgination
Added web.base.url.freeze and added true value
Added report.url parameter with value http://0.0.0.0:8069
Uninstalled and reinstalled modules
Looked in the database to see if the actions got screwed up (can't figure out why it is looking for the backend template for sale.sale_order_portal_template even when I try to print an invoice
Validated that the template exists and it is untouched from the installation according to what is on github.
Validated that the same error occurs when viewing in html.
About the environment: I am running this on AWS using Ubuntu 18.04 and also using nginx to reroute from 8069 to 80 and also for SSL. I don't know much about python so I have not modified any of the .py files.
Thank you for reading and I hope that someone out there has a solution.
Error:
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 332, in _compiled_fn
return compiled(self, append, new, options, log)
File "<template>", line 1, in template_sale_sale_order_portal_template_357
File "<template>", line 2, in body_call_content_355
File "<template>", line 5, in set_315
File "<template>", line 6, in body_call_content_313
AttributeError: 'NoneType' object has no attribute '_name'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 2023, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1961, in report_routes
pdf = report.with_context(context).render_qweb_pdf(docids, data=data)[0]
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 727, in render_qweb_pdf
html = self.with_context(context).render_qweb_html(res_ids, data=data)[0]
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 767, in render_qweb_html
return self.render_template(self.report_name, data), 'html'
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 541, in render_template
return view_obj.render_template(template, values)
File "/usr/lib/python3/dist-packages/odoo/addons/web_window_title/models/ir_ui_view.py", line 18, in render_template
return super(View, self).render_template(template, values=values, engine=engine)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1174, in render_template
return self.browse(self.get_view_id(template)).render(values, engine)
File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 25, in render
return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1182, in render
return self.env[engine].render(self.id, qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 58, in render
result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 260, in render
self.compile(template, options)(self, body.append, values or {})
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn
raise e
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 332, in _compiled_fn
return compiled(self, append, new, options, log)
File "<template>", line 1, in template_sale_report_saleorder_227
File "<template>", line 2, in body_call_content_225
File "<template>", line 3, in foreach_224
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn
raise e
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 332, in _compiled_fn
return compiled(self, append, new, options, log)
File "<template>", line 1, in template_sale_report_saleorder_document_277
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn
raise e
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 332, in _compiled_fn
return compiled(self, append, new, options, log)
File "<template>", line 1, in template_web_external_layout_308
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 339, in _compiled_fn
raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.models.qweb.QWebException: 'NoneType' object has no attribute '_name'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 332, in _compiled_fn
return compiled(self, append, new, options, log)
File "<template>", line 1, in template_sale_sale_order_portal_template_357
File "<template>", line 2, in body_call_content_355
File "<template>", line 5, in set_315
File "<template>", line 6, in body_call_content_313
AttributeError: 'NoneType' object has no attribute '_name'
Error to render compiling AST
AttributeError: 'NoneType' object has no attribute '_name'
Template: sale.sale_order_portal_template
Path: /t/t/body/div[1]/t/t/t
Node: <t t-set="backend_url" t-value="'/web#model=%s&id=%s&action=%s&view_type=form' % (sale_order._name, sale_order.id, action.id)"/>