تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (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
حول هذا المنتدى
المساعدة

Invoice report section issue in line item

اشتراك

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

لقد تم الإبلاغ عن هذا السؤال
attachaccounting
3 الردود
1395 أدوات العرض
الصورة الرمزية
Gowtham A

In this code, the section is printed after the line items. As shown in the image I shared, it should appear the related line items. Please help me fix it


<tbody class="invoice_tbody" style="border-bottom:2px solid gainsboro;">
<t t-set="current_subtotal" t-value="0"/>
<t t-set="current_subtotal_TTC" t-value="0"/>
<t t-foreach="o.invoice_line_ids" t-as="line">
<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>
<t t-set="current_subtotal_TTC" t-value="current_subtotal_TTC + line.price_total"/>
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="line.display_type == 'product'" name="account_invoice_line_accountable">
<td name="account_invoice_line_name">
<span t-field="line.name"/>
</td>
<!-- <td class="d-none">-->
<!-- <span t-field="line.origin"/>-->
<!-- </td>-->
<td class="text-end">
<span t-field="line.quantity"/>
<span t-field="line.product_uom_id" groups="uom.group_uom"/>
</td>
<td t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-field="line.price_unit"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<td t-if="display_discount"
t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-field="line.discount"/>
</td>
<td t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))"/>
</td>
<td style="border-top-style: hidden;" class="text-end o_price_total">
<span t-field="line.price_subtotal"/>
</td>
<td style="border-top-style: hidden;" class="text-end o_price_total">
<span t-field="line.price_total"/>
</td>
</t>
<t t-if="line.display_type == 'line_section'">
<td t-att-colspan="colspan" style="font-weight:bold;">
<span t-field="line.name"/>
</td>
<t t-set="current_section" t-value="line"/>
<t t-set="current_subtotal" t-value="0"/>
<t t-set="current_subtotal_TTC" t-value="0"/>
</t>
<t t-if="line.display_type == 'line_note'"
style="font-size:11.5px !important;font-weight:bold;">
<td t-att-colspan="colspan" style="font-weight:bold; white-space: pre-wrap;">
<span t-esc="line.name"/>
</td>
</t>
</tr>
<t t-if="current_section and (line_last or o.invoice_line_ids[line_index+1].display_type == 'line_section')">
<tr class="is-subtotal text-end">
<td></td>
<td></td>
<td></td>

<td>
<strong class="mr16">Sous-total</strong>

</td>
<td>
<span
t-esc="current_subtotal"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
<td>
<span
t-esc="current_subtotal_TTC"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
</tr>
</t>
</t>
</tbody>
0
الصورة الرمزية
إهمال
الصورة الرمزية
Cybrosys Techno Solutions Pvt.Ltd
أفضل إجابة

Hi,

You need to move the section and note line checks (line.display_type == 'line_section' and line.display_type == 'line_note') above the product line rendering block.


Please refer to the code below:


<tbody class="invoice_tbody" style="border-bottom:2px solid gainsboro;">
<t t-set="current_subtotal" t-value="0"/>
<t t-set="current_subtotal_TTC" t-value="0"/>
<t t-foreach="o.invoice_line_ids" t-as="line">
<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>
<t t-set="current_subtotal_TTC" t-value="current_subtotal_TTC + line.price_total"/>
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="line.display_type == 'line_section'">
<td t-att-colspan="colspan" style="font-weight:bold;">
<span t-field="line.name"/>
</td>
<t t-set="current_section" t-value="line"/>
<t t-set="current_subtotal" t-value="0"/>
<t t-set="current_subtotal_TTC" t-value="0"/>
</t>
<t t-if="line.display_type == 'line_note'"
style="font-size:11.5px !important;font-weight:bold;">
<td t-att-colspan="colspan" style="font-weight:bold; white-space: pre-wrap;">
<span t-esc="line.name"/>
</td>
</t>
<t t-if="line.display_type == 'product'" name="account_invoice_line_accountable">
<td name="account_invoice_line_name">
<span t-field="line.name"/>
</td>
<!-- <td class="d-none">-->
<!-- <span t-field="line.origin"/>-->
<!-- </td>-->
<td class="text-end">
<span t-field="line.quantity"/>
<span t-field="line.product_uom_id" groups="uom.group_uom"/>
</td>
<td t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-field="line.price_unit"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<td t-if="display_discount"
t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-field="line.discount"/>
</td>
<td t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))"/>
</td>
<td style="border-top-style: hidden;" class="text-end o_price_total">
<span t-field="line.price_subtotal"/>
</td>
<td style="border-top-style: hidden;" class="text-end o_price_total">
<span t-field="line.price_total"/>
</td>
</t>
</tr>
<t t-if="current_section and (line_last or o.invoice_line_ids[line_index+1].display_type == 'line_section')">
<tr class="is-subtotal text-end">
<td></td>
<td></td>
<td></td>
<td>
<strong class="mr16">Sous-total</strong>
</td>
<td>
<span
t-esc="current_subtotal"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
<td>
<span
t-esc="current_subtotal_TTC"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
</tr>
</t>
</t>
</tbody>


Hope it helps.

0
الصورة الرمزية
إهمال
الصورة الرمزية
Gowtham A
الكاتب أفضل إجابة

I have tried your code but still section is appeared at last, any ways thank you

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

Maybe try to move the line.display_type == 'line_section' logic before the main <tr> is rendered so that the section row prints before the associated product lines. Like this:

<tbody class="invoice_tbody" style="border-bottom:2px solid gainsboro;">
    <t t-set="current_subtotal" t-value="0"/>
    <t t-set="current_subtotal_TTC" t-value="0"/>
    <t t-foreach="o.invoice_line_ids" t-as="line" t-index="line_index">
       
        <!-- SECTION HEADER FIRST -->
        <t t-if="line.display_type == 'line_section'">
            <tr class="bg-200 font-weight-bold o_line_section">
                <td t-att-colspan="colspan" style="font-weight:bold;">
                    <span t-field="line.name"/>
                </td>
            </tr>
            <t t-set="current_section" t-value="line"/>
            <t t-set="current_subtotal" t-value="0"/>
            <t t-set="current_subtotal_TTC" t-value="0"/>
        </t>

        <!-- NOTE LINE -->
        <t t-if="line.display_type == 'line_note'">
            <tr class="font-italic o_line_note">
                <td t-att-colspan="colspan" style="font-weight:bold; white-space: pre-wrap;">
                    <span t-esc="line.name"/>
                </td>
            </tr>
        </t>

        <!-- PRODUCT LINE -->
        <t t-if="line.display_type == 'product'" name="account_invoice_line_accountable">
            <tr>
                <td name="account_invoice_line_name">
                    <span t-field="line.name"/>
                </td>
                <td class="text-end">
                    <span t-field="line.quantity"/>
                    <span t-field="line.product_uom_id" groups="uom.group_uom"/>
                </td>
                <td t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
                    <span t-field="line.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                </td>
                <td t-if="display_discount"
                    t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
                    <span t-field="line.discount"/>
                </td>
                <td t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
                    <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))"/>
                </td>
                <td class="text-end o_price_total" style="border-top-style: hidden;">
                    <span t-field="line.price_subtotal"/>
                </td>
                <td class="text-end o_price_total" style="border-top-style: hidden;">
                    <span t-field="line.price_total"/>
                </td>
            </tr>
            <!-- Update subtotals -->
            <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>
            <t t-set="current_subtotal_TTC" t-value="current_subtotal_TTC + line.price_total"/>
        </t>

        <!-- SUBTOTAL AFTER LAST LINE IN SECTION -->
        <t t-if="current_section and (line_index + 1 == len(o.invoice_line_ids) or o.invoice_line_ids[line_index + 1].display_type == 'line_section')">
            <tr class="is-subtotal text-end">
                <td></td><td></td><td></td>
                <td><strong class="mr16">Sous-total</strong></td>
                <td>
                    <span t-esc="current_subtotal"
                          t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                </td>
                <td>
                    <span t-esc="current_subtotal_TTC"
                          t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                </td>
            </tr>
        </t>

    </t>
</tbody>

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

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

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
Facing An Issue In Image Classification Model Optimization.
attach accounting
الصورة الرمزية
0
أكتوبر 25
302
{+56} (Latam Telefono CL) ¿Cómo llamar a Latam en Chile?
attach accounting chrome
الصورة الرمزية
0
نوفمبر 25
12
(Latam Chile) ¿Cómo llamar a Latam Chile desde celular?
action attach accounting
الصورة الرمزية
0
نوفمبر 25
39
𝓛𝓲𝓰𝓪𝓻 ⒷⓇ }Como falar com British Airways pelo exterior?
attach
الصورة الرمزية
0
نوفمبر 25
1
How can I access the details of the Inventory Variation posted at month end in Odoo 19?
action attach accounting chrome
الصورة الرمزية
0
نوفمبر 25
6
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "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