Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Intelligence artificielle
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Supermarché
    • Quincaillerie
    • Magasin de jouets
    Restauration & Hôtellerie
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Homme à tout faire
    • Matériel informatique & support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Parcourir toutes les industriesInauguration Odoo Lyon
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenir partenaire
    • Services pour partenaires
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Server error on delivery note with kit

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
manufacturingkitdeliverynotekits
1 Répondre
335 Vues
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
Ignorer
Muhammad Farooq Iqbal

perfect

Avatar
Muhammad Farooq Iqbal
Meilleure réponse

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
Ignorer
Daniel Huying
Auteur

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
Auteur

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

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
A product with a kit-type bill of materials can not have a reordering rule Résolu
manufacturing reordering kits
Avatar
Avatar
1
juin 25
1812
How to break up delivery note into Kits? Odoo13
kit deliverynote Odoo13
Avatar
Avatar
1
déc. 23
4494
Manufacturing order for Kit BOM
manufacturing bom kit
Avatar
Avatar
1
nov. 23
4807
Kit Component replacement
manufacturing sale.order kit
Avatar
0
oct. 21
3528
MTO and availability of product online
sales manufacturing kit MTO
Avatar
Avatar
Avatar
3
sept. 24
2962
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenir partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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