Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    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
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

combine several lines into 1 row in print pdf odoo 15

Subscribe

Get notified when there's activity on this post

This question has been flagged
pdfinvoiceodoo15
1828 Views
Avatar
Aprilia Zahratunnisa

I want to create 1 row if the invoice has similarities, for example if it has default_code 'Xirallic'. So combine several lines that have default_code 'Xirallic' in the table.



<table class="table table-condensed" style="border: 1px solid #000000; border-collapse: collapse; width: 100%; padding: 0;">

                                <thead>

                                    <tr>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 3%;">No</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 13%;">Kuantitas</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 12%;">Kode Barang</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 22%;">Nama Barang</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 8%;">Harga Satuan</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 6%;">Diskon I</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 6%;">Diskon II</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 6%;">Diskon III</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: center; width: 6%;">Diskon Tambahan</th>

                                        <th style="font-size: 14px; border: 1px solid #000000; text-align: right; width: 11%;">Jumlah</th>

                                    </tr>

                                </thead>

                                <tbody>

                                    <t t-set="sequence" t-value="1 + page_idx * items_per_page"/>

                                    <t t-foreach="chunk" t-as="line">

                                        <tr>

                                            <td style="border: 1px solid; text-align: center; font-size: 14px;">

                                                <t t-esc="sequence"/>

                                                <t t-set="sequence" t-value="sequence + 1"/>

                                            </td>

                                            <td style="text-align: center; border: 1px solid; width: 17%;">

                                                <table style="width: 100%; border: none;">

                                                    <tr>

                                                        <td style="text-align: left; border: none; padding: 0; font-size: 14px;">

                                                            <t t-if="line.product_id.default_code">

                                                                <t t-if="line.product_id.default_code.startswith('327') and 'Xirallic' in line.product_id.default_code">

                                                                    <span><t t-esc="total_xirallic_327"/> <t t-esc="line.product_uom_id.name[:2]"/></span>

                                                                </t>

                                                                <t t-elif="line.product_id.default_code.startswith('257') and 'Xirallic' in line.product_id.default_code">

                                                                    <span><t t-esc="total_xirallic_257"/> <t t-esc="line.product_uom_id.name[:2]"/></span>

                                                                </t>

                                                                <t t-elif="'Standard' in line.product_id.default_code">

                                                                    <span><t t-esc="total_standard_quantity"/> <t t-esc="line.product_uom_id.name[:2]"/></span>

                                                                </t>

                                                                <t t-elif="'Pearl' in line.product_id.default_code">

                                                                    <span><t t-esc="total_pearl_quantity"/> <t t-esc="line.product_uom_id.name[:2]"/></span>

                                                                </t>

                                                                <t t-elif="'Special' in line.product_id.default_code">

                                                                    <span><t t-esc="total_special_quantity"/> <t t-esc="line.product_uom_id.name[:2]"/></span>

                                                                </t>

                                                                <t t-else="">

                                                                    <span><t t-esc="round(line.quantity)"/> <t t-esc="line.product_uom_id.name[:2]"/></span>

                                                                </t>

                                                            </t>

                                                            <t t-else="">

                                                                <p/>

                                                            </t>

                                                        </td>

                                                        <td style="text-align: right; border: none; padding: 0; font-size: 14px;">

                                                            <t t-if="line.product_id.default_code">

                                                                <t t-if="'Xirallic' in line.product_id.default_code">

                                                                    <p/>

                                                                </t>

                                                                <t t-elif="'Standard' in line.product_id.default_code">

                                                                    <p/>

                                                                </t>

                                                                <t t-elif="'Pearl' in line.product_id.default_code">

                                                                    <p/>

                                                                </t>

                                                                <t t-elif="'Special' in line.product_id.default_code">

                                                                    <p/>

                                                                </t>

                                                                <t t-else="">

                                                                    <span><t t-esc="line.product_id.default_code.split('-', 2)[-1]"/></span>

                                                                </t>

                                                            </t>

                                                            <t t-else="">

                                                                <p/>

                                                            </t>

                                                        </td>

                                                    </tr>

                                                </table>

                                            </td>

                                            <td style="border: 1px solid; text-align: left; width: 15%; font-size: 14px;">

                                                <t t-if="line.product_id.default_code">

                                                    <t t-if="'LTSET' in line.product_id.default_code">

                                                        <t t-esc="line.product_id.default_code[:8]"/>

                                                        <t t-set="child_products" t-value="env['product.product'].search([('parent_product', '=', line.product_id.id)])"/>

                                                        <t t-foreach="child_products" t-as="child_product">

                                                            <br/>

                                                            <span><t t-esc="child_product.default_code"/></span>

                                                        </t>

                                                    </t>

                                                    <t t-elif="line.product_id.default_code.startswith('257') and 'Xirallic' in line.product_id.default_code">

                                                        <span>257-Xirallic</span>

                                                    </t>

                                                    <t t-elif="line.product_id.default_code.startswith('327') and 'Xirallic' in line.product_id.default_code">

                                                        <span>327-Xirallic</span>

                                                    </t>

                                                    <t t-elif="'Standard' in line.product_id.default_code">

                                                        <span>257-Standard</span>

                                                    </t>

                                                    <t t-elif="'Pearl' in line.product_id.default_code">

                                                        <span>257-Pearl</span>

                                                    </t>

                                                    <t t-elif="'Special' in line.product_id.default_code">

                                                        <span>257-Special</span>

                                                    </t>

                                                    <t t-else="">

                                                        <t t-esc="line.product_id.default_code"/>

                                                    </t>

                                                </t>

                                                <t t-else="">

                                                    <p/>

                                                </t>

                                            </td>

                                            <td style="border: 1px solid; font-size: 14px;">

                                                <span t-field="line.product_id.name"/>

                                            </td>

                                            <td style="border: 1px solid; text-align: right; font-size: 14px;">

                                                <span t-esc="'{:,.0f}'.format(line.price_unit)"/>

                                            </td>

                                            <td style="border: 1px solid; text-align: center; font-size: 14px;">

                                                <t t-if="line.multiple_discounts and len(line.multiple_discounts) &gt; 0">

                                                    <t t-set="discount_1" t-value="line.env['discount.discount'].browse(int(line.multiple_discounts[0]))"/>

                                                    <t t-if="doc.partner_id.id == 37191">

                                                        <t t-esc="'{:.1f}'.format(discount_1.amount) if discount_1 else '0'"/>%

                                                    </t>

                                                    <t t-elif="doc.partner_id.id != 37191">

                                                        <t t-esc="'{:.0f}'.format(discount_1.amount) if discount_1 else '0'"/>%

                                                    </t>

                                                </t>

                                                <t t-else="">

                                                    0%

                                                </t>

                                            </td>

                                            <td style="border: 1px solid; text-align: center; font-size: 14px;">

                                                <t t-if="line.multiple_discounts and len(line.multiple_discounts) > 1">

                                                    <t t-set="discount_2" t-value="line.env['discount.discount'].browse(int(line.multiple_discounts[1]))" />

                                                    <t t-esc="'{:.0f}'.format(discount_2.amount) if discount_2 else '0'" />%

                                                </t>

                                                <t t-else="">

                                                    0%

                                                </t>

                                            </td>

                                            <td style="border: 1px solid; text-align: center; font-size: 14px;">

                                                <t t-if="line.multiple_discounts and len(line.multiple_discounts) > 2">

                                                    <t t-set="discount_3" t-value="line.env['discount.discount'].browse(int(line.multiple_discounts[2]))" />

                                                    <t t-esc="'{:.0f}'.format(discount_3.amount) if discount_3 else '0'" />%

                                                </t>

                                                <t t-else="">

                                                    0%

                                                </t>

                                            </td>

                                            <td style="border: 1px solid; text-align: center; font-size: 14px;">

                                                <span t-esc="'{:.0f}'.format(line.discount_tambahan)"/>%

                                            </td>

                                            <td style="border: 1px solid; text-align: right; font-size: 14px;">

                                                <span t-esc="'{:,.0f}'.format(line.price_total)"/>

                                            </td>

                                        </tr>

                                    </t>

                                </tbody>

                                <tfoot t-if="page_idx == page_count - 1">

                                    <tr>

                                        <td colspan="9" class="text-right">

                                            <b>Total</b>

                                        </td>

                                        <td style="border: 1px solid #000000; text-align: right; font-size: 14px;">

                                            <span t-esc="'{:,.0f}'.format(round(doc.amount_total, 2))"/>

                                        </td>

                                    </tr>

                                </tfoot>

                            </table>

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

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

Sign up
Related Posts Replies Views Activity
PDF Invoice line overflow
pdf invoice
Avatar
Avatar
Avatar
2
जुल॰ 25
1678
Quote PDF Spacing & Layout
pdf invoice
Avatar
Avatar
1
अग॰ 25
2203
How to apply a customized invoice pdf to an email template
pdf invoice
Avatar
Avatar
1
जून 24
3458
Odoo Invoice PDF download from External API
pdf invoice odoo17
Avatar
0
अक्तू॰ 24
3001
Header and footer not showing in PDF Solved
pdf invoice v14
Avatar
Avatar
Avatar
Avatar
Avatar
11
अक्तू॰ 24
34607
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة 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

Odoo, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

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