تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (BI)
    • المستندات
    • توقيع إلكتروني
    المبيعات
    • إدارة علاقات العملاء
    • المبيعات
    • نقطة البيع للمتاجر
    • نقطة البيع للمطاعم
    • الاشتراكات
    • تأجير
    المواقع الإلكترونية
    • أداة بناء المواقع الإلكترونية
    • متاجر إلكترونية
    • مدونة
    • المنتدى
    • دردشة مباشرة
    • التعليم الإلكتروني
    سلسلة التوريد
    • المستودعات
    • التصنيع
    • إدارة دورة حياة المنتج
    • المشتريات
    • الصيانة
    • الجودة
    الموارد البشرية
    • موظفون
    • التوظيف
    • إجازة عمل
    • التقييمات
    • الإحالات
    • تطبيق الأسطول
    التسويق
    • التسويق الإجتماعي
    • التسويق عبر البريد الإلكتروني
    • التسويق عبر الرسائل النصية
    • فعاليات
    • أتمتة التسويق
    • الاستطلاعات
    الخدمات
    • المشاريع
    • الجداول الزمنية
    • الخدمة الميدانية
    • مكتب المساعدة
    • التخطيط
    • مواعيد
    اﻹنتاجية
    • مناقشة
    • الموافقات
    • إنترنت الأشياء "IoT"
    • بروتوكول ربط المحادثات الصوتية عبر الإنترنت
    • المعرفة
    • WhatsApp
    التطبيقات الخارجية ستوديو أودو منصة أودو السحابية
  • قطاعات الأعمال
    البيع بالتجزئة
    • متجر كتب
    • متجر ملابس
    • متجر أثاث
    • متجر بقالة
    • متجر معدات
    • متجر ألعاب
    الطعام والضيافة
    • بار وحانة
    • المطعم
    • مطعم للوجبات السريعة
    • نزل للضيوف
    • موزّع مشروبات
    • فندق
    العقارات
    • وكالة عقارات
    • شركة هندسة معمارية
    • البناء
    • إدارة العقارات
    • العناية بالحدائق
    • اتحاد مُلاّك العقارات
    استشارة
    • مؤسسة محاسبية
    • شريك أودو
    • وكالة تسويقية
    • منشأة قانونية
    • استقطاب المواهب
    • التدقيق والتوثيق
    التصنيع
    • الأقمشة
    • معدني
    • الأثاث
    • الطعام
    • مصنع خمور
    • هدايا الشركات
    الصحة واللياقة البدنية
    • نادي رياضي
    • متجر نظارات
    • مركز لياقة بدنية
    • الممارسون الصحيون
    • صيدلية
    • صالون تصفيف الشعر
    التجارة
    • عامل صيانة
    • الأجهزة والمعدات التقنية ودعمها
    • أنظمة الطاقة الشمسية
    • صانع أحذية
    • خدمات التنظيف
    • خدمات التكييف (HVAC)
    غير ذلك
    • منظمة غير ربحية
    • وكالة بيئية
    • تأجير لوحات إعلانية
    • تصوير
    • تأجير دراجات
    • بائع وسيط للبرمجيات
    تصفح كافة قطاعات الأعمال
  • مجتمع أودو
    تعلم
    • دروس
    • التوثيق
    • شهادات
    • التدريب
    • مدونة
    • بودكاست
    قم بتعزيز التعليم
    • برنامج تعليم
    • Scale UP! لعبة الأعمال
    • قم بزيارة أودو
    احصل على البرنامج
    • تحميل
    • قارنْ الإصدارات
    • إطلاق
    تعاون
    • جيت هاب "Github"
    • المنتدى
    • فعاليات
    • الترجمات
    • كنْ شريكاً
    • خدمات الشركاء
    • سجل مكتب المحاسبة الخاص بك
    احصل على الخدمات
    • اعثر على شريك
    • اعثر على محاسب
    • قابل أحد مرشدي الأعمال
    • خدمات التنفيذ
    • مراجع العملاء
    • الدعم
    • الترقيات
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    الحصول على عرض توضيحي
  • الأسعار
  • المساعدة

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • إدارة علاقات العملاء
  • e-Commerce
  • المحاسبة
  • المخزون
  • PoS
  • المشروع
  • MRP
All apps
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
المساعدة

After validate the delivery slip is not comes up but get error code

اشتراك

تسلم الإشعارات عندما يكون هناك نشاط في هذا المنشور

لقد تم الإبلاغ عن هذا السؤال
deliverydeliverynoteInventory
4 الردود
1790 أدوات العرض
الصورة الرمزية
Mickey

Hi i try to validate delivery but get error message and delivery slip is not create.

Do you know to to solve this problem?


RPC_ERROR

Odoo Server Error


Traceback (most recent call last):
  File "<198>", line 142, in template_198
  File "<198>", line 42, in template_198_content
KeyError: 'doc'

 

1
الصورة الرمزية
إهمال
الصورة الرمزية
Cybrosys Techno Solutions Pvt.Ltd
أفضل إجابة

Hi,


The error KeyError: 'doc' happens when the delivery slip report tries to use a variable doc that hasn’t been defined.


Odoo provides a variable called docs (a list of records), but the template is using doc without setting it first.


This usually happens in a custom module or a modified delivery slip report template.


To check this, activate Developer Mode > go to Technical > Reports > Reports > search for Delivery Slip > open the related QWeb template.


If you see something like <t t-esc="doc.name"/>, but there’s no doc defined, that’s the cause of the error.


To fix it, add <t t-set="doc" t-value="docs[0]"/> before using doc if only one record is printed.


If the report is for multiple deliveries, wrap your code in <t t-foreach="docs" t-as="doc"> ... </t> to make doc available.


After updating the template, upgrade your custom module and try validating the delivery again-the slip should now be created without errors.



Hope it helps

1
الصورة الرمزية
إهمال
Mickey
الكاتب

I followed your instruction but key error is change to "o"

odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
KeyError: 'o'
Template: stock.report_delivery_document
Path: /t/t/t/t[2]
Node: <t t-set="partner" t-value="o.partner_id or (o.move_ids and o.move_ids[0].partner_id) or False"/>

code i updated as below; in report_deliveryslip

<t t-name="stock.report_deliveryslip">
<t t-set="doc" t-value="docs[0]"/>
<t t-foreach="docs" t-as="doc">
<t t-call="stock.report_delivery_document" t-lang="doc._get_report_lang()"/>
</t>
</t>

الصورة الرمزية
Mickey
الكاتب أفضل إجابة

Finally, i did go to the template : web.address_layout (Customize by studioX)

 and delete  "Inherited View" and all work deliveryslip can print out.


Thank you for all help.


I appreciated.

0
الصورة الرمزية
إهمال
الصورة الرمزية
Piyush H
أفضل إجابة

The error message KeyError: 'doc' in Odoo when validating a delivery slip indicates that the system is trying to access a variable or key named 'doc' that doesn't exist in the template or code being executed. This often occurs during the report generation process.

Here are steps to troubleshoot and resolve this problem:

1. Identify the specific report template:

  • The traceback indicates the error is within a template file <198>. You'll need to find the exact name of the delivery slip template being used.
  • In Odoo, go to Settings > Technical > Reporting > Reports. Search for "Delivery Slip" or a similar name related to delivery operations.
  • Once you find the report, examine its External ID (e.g., stock.report_delivery_slip). This ID helps identify the associated QWeb template.
  • Then, navigate to Settings > Technical > User Interface > Views and search for the external ID of the report to find the corresponding view.

2. Examine the QWeb template:

  • Open the QWeb view identified in the previous step.
  • Carefully review the template code, looking for where the variable doc is used. The error KeyError: 'doc' means that the code is trying to access a dictionary key or object property named doc, but it's not available in the context.
  • Possible causes:
    • Typo: A simple typo in the template code when referencing doc.
    • Missing Definition: The variable doc is not being properly passed or defined within the template's context.
    • Incorrect Context: The template is expecting a different type of object than what's being provided.

3. Check the report's Python code:

  • The QWeb template receives its data from a Python class. You need to find the Python code that generates the data for the delivery slip report.
  • Go to Settings > Technical > Actions > Reports. Find the delivery slip report. Check the "Model" field. This tells you which Odoo model is used as the basis for the report (e.g., stock.picking).
  • Examine the code related to that model, especially any methods that are called when generating the delivery slip. Look for how the doc variable (or its equivalent) is being prepared and passed to the QWeb template.
  • Possible issues:
    • The Python code is not correctly fetching or preparing the data that the template expects.
    • The doc variable is not being added to the context dictionary that's passed to the template.

4. Solutions

  • Correct the template: If there's a typo or missing definition in the QWeb template, fix it. Ensure that doc is correctly referenced and that all necessary data is available in the template's context.
  • Modify the Python code: If the Python code is not providing the correct data, adjust it to fetch the required information and pass it to the template. Make sure the doc variable (or its equivalent) is properly populated.
  • Check for customizations: If you or someone else has customized the delivery slip report, review those changes carefully. Customizations are often the source of such errors.
  • Update Odoo: If you're using an older version of Odoo, consider updating to the latest stable release. Bug fixes and improvements in newer versions might resolve the issue.
  • Check installed modules: In some cases, this error can be caused by a faulty or incompatible module. Try disabling recently installed modules to see if that resolves the issue.

Example Scenario and Solution

Let's say the delivery slip template has this line:

<span t-esc="doc.name"/>

And the Python code preparing the data looks like this:

def _get_report_values(self, docids, data=None):
    docs = self.env['stock.picking'].browse(docids)
    return {
        'doc_ids': docids,
        'doc': docs,
    }

In this case, doc is a collection of stock.picking records. To access the name of the first record, you should modify the template:

<span t-esc="doc[0].name"/>

0
الصورة الرمزية
إهمال
الصورة الرمزية
DataInteger Consultancy Services LLP
أفضل إجابة
Cause

Your QWeb report (usually stock.report_deliveryslip_document ) tries to use the variable doc , but it's not defined .

In Odoo, the report engine passes a variable called docs (a recordset). If you use doc , you must define it first.


Step-by-Step Fix:
  1. Go to Developer Mode
    • Activate Developer Mode in Odoo.
  2. Navigate to QWeb Views
    • Menu: Technical → User Interface → Views
    • Search for the delivery slip template:
      Example: stock.report_deliveryslip_document (or your custom report)
  3. Edit the Template

At the top of the XML , add this line right after the opening <t> tag:

<t t-set="doc" t-value="docs[0]"/>
Example of Correct Template Structure
<t t-name="stock.report_deliveryslip_document">
  <t t-call="web.html_container">
    <t t-set="doc" t-value="docs[0]"/> <!-- ✅ Fix line -->
    <div class="page">
      <h2 t-esc="doc.name"/> <!-- Example usage -->
      <p t-esc="doc.partner_id.name"/>
      <!-- Your report content -->
    </div>
  </t-call>
</t>

This sets doc = docs[0] , so all your t-esc="doc.xyz" calls now work.

Why This Fix Works
  • docs is the standard list of records Odoo passes into QWeb reports.
  • If you're using doc , but it isn't defined from docs[0] , you get a KeyError .


Thanks & Regards,

Email: contact@datainteger.com 

0
الصورة الرمزية
إهمال
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!

أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
Delivery Note in Repair
delivery repair deliverynote
الصورة الرمزية
الصورة الرمزية
1
أغسطس 20
3894
Quant's editing is restricted, you can't do this operation.
Inventory
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
نوفمبر 25
414
Error with Check Status
delivery
الصورة الرمزية
0
سبتمبر 25
824
Odoo module to allow customers to sign off on delivery slip تم الحل
delivery signature deliverynote deliveryslip v14
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
أغسطس 25
6673
How to attach specific locations to products
Inventory
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
أغسطس 25
1430
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "Github"
  • المشغل الآلي رنبوت
  • الترجمات
خدماتنا
  • استضافة أودو إس إتش
  • الدعم
  • الترقية
  • التطويرات المخصصة
  • التعليم
  • اعثر على محاسب
  • اعثر على شريك
  • كنْ شريكاً
معلومات عنا
  • شركتنا
  • أصول العلامة التجارية
  • اتصلْ بنا
  • الوظائف
  • فعاليات
  • بودكاست
  • مدونة
  • عملاء
  • قانوني • الخصوصية
  • الحماية
الْعَرَبيّة 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 ภาษาไทย Türkçe українська Tiếng Việt

أودو هو عبارة عن مجموعة من تطبيقات الأعمال مفتوحة المصدر التي تغطي جميع احتياجات شركتك، مثل: إدارة علاقات العملاء والتجارة الإلكترونية والمحاسبة والمخزون ونقاط البيع وإدارة المشاريع وما إلى ذلك.

ما يجعل من أودو مميزاً هو هدفه بأن يكون سهل الاستخدام للغاية ومتكاملاً تمامًا في الوقت ذاته.

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