We recently activated the manufacturing app (Version 19.0.2.0) in our Odoo 19.0 test system to see if bill-of-materials (BOM) for kits would be a suitable solution for us.
We created a BOM for a new article, then used it in a sales order. On attempt to print the delivery note, we're getting a server error:
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 758, in _render_iterall
for item in frame.iterator:
File "<2064>", line 1372, in template_stock_report_delivery_document_2064_t_call_1
KeyError: 'move_lines'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/report.py", line 120, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 852, in _render_iterall
raise QWebError(qweb_error_info) from error
odoo.addons.base.models.ir_qweb.QWebError: Error while rendering the template:
KeyError: 'move_lines'
Template: stock.report_delivery_document
Reference: 2064
Path: /t/t/t/div/t[21]/t
Element: <t t-set="move_lines" t-value="move_lines.filtered(lambda m: not m.move_id.bom_line_id)"/>
From: (2069, '/t/t/t', '<t t-call="stock.report_delivery_document" t-inner-content="True" t-options-lang="o._get_report_lang()"/>')
(2064, '/t/t', '<t t-call="web.html_container"/>')
(198, '/t/t[2]', '<t t-call="web.report_layout"/>')
(196, '/t/html/body/div/main/t', '<t t-out="0"/>')
(198, '/t/t[2]', '<t t-call="web.report_layout"/>')
(196, '/t/html/body/div/main/t', '<t t-out="0"/>')
(2064, '/t/t', '<t t-call="web.html_container"/>')
(2064, '/t/t/t', '<t t-call="web.external_layout"/>')
(2064, '/t/t/t/div/t[21]/t', '<t t-set="move_lines" t-value="move_lines.filtered(lambda m: not m.move_id.bom_line_id)"/>')
Has anyone else encountered this? How can it be fixed?
perfect