Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Artificial Intelligence
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Property Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

Server error on delivery note with kit

Naroči se

Get notified when there's activity on this post

This question has been flagged
manufacturingkitdeliverynotekits
1 Odgovori
346 Prikazi
Avatar
Daniel Huying

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?


0
Avatar
Opusti
Muhammad Farooq Iqbal

perfect

Avatar
Muhammad Farooq Iqbal
Best Answer

Hi,

This error is most likely coming from a customized or inherited delivery note report, not from the kit BoM itself.

The report is failing because this line is trying to use move_lines, but move_lines has not been defined before that point:

<t t-set="move_lines" t-value="move_lines.filtered(lambda m: not m.move_id.bom_line_id)"/>

So Odoo raises:

KeyError: 'move_lines'

Please check any custom / Studio inherited view of:

stock.report_delivery_document

Especially check any customization added to hide kit component lines or filter BoM lines.

The fix is to define move_lines before filtering it, or use the correct Odoo 19 variable from the delivery order, for example:

<t t-set="move_lines" t-value="o.move_line_ids"/>
<t t-set="move_lines" t-value="move_lines.filtered(lambda m: not m.move_id.bom_line_id)"/>

or adjust the report to use o.move_ids / o.move_line_ids depending on which section of the delivery slip you are customizing.

I would suggest reverting the delivery slip report to the standard version and testing again. If it prints correctly, then the issue is definitely in the inherited/custom report view, not in the kit setup.

0
Avatar
Opusti
Daniel Huying
Avtor

The line in question is apparently being added by the inherited view
mrp.stock_report_delivery_document_inherit_mrp . This is directly below stock.report_delivery_document in the inheritance, and seems to have been added by the manufacturing module. Our custom view for the delivery note is at the same level, but it does not use or define a variable move_lines. Deactivating it eliminated the error; it is apparently overloading the section where move_lines is being defined. So it looks like I can take the solution from here.

Daniel Huying
Avtor

I added <t t-set="move_lines" t-value="o.move_line_ids"/> in our custom view and now the error no longer appears.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
A product with a kit-type bill of materials can not have a reordering rule Solved
manufacturing reordering kits
Avatar
Avatar
1
jun. 25
1815
How to break up delivery note into Kits? Odoo13
kit deliverynote Odoo13
Avatar
Avatar
1
dec. 23
4498
Manufacturing order for Kit BOM
manufacturing bom kit
Avatar
Avatar
1
nov. 23
4811
Kit Component replacement
manufacturing sale.order kit
Avatar
0
okt. 21
3549
MTO and availability of product online
sales manufacturing kit MTO
Avatar
Avatar
Avatar
3
sep. 24
2962
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now