Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • Hotel
    Real Estate
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    Consulting
    • Accounting Firm
    • Odoo पार्टनर
    • Marketing Agency
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • 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

Modifying the ZPL Labels

Subscribe

Get notified when there's activity on this post

This question has been flagged
printinglabelszpl
2 Replies
2264 Views
Avatar
Chad Huskey

In Odoo we are attempting to show information from the associated delivery ticket/sale order in Product Label (ZPL) found in Settings / Technical / Actions / Reports. 


We would like to display the customer's name, sales order number, sales order date, and the description of each item on the label. 


The product name was already a part of the label, but we can't find the way to pull the other fields from the delivery ticket when printing ZPL labels.


So we need to figure out what to add to the code to do this.  We've tried everything we can think of.


The current code in its QWeb view (label_product_product_view) is the following:

```

<t t-name="stock.label_product_pr oduct_view">

    <t t-foreach="quantity.items()" t-as="barcode_and_qty_by_produ ct">

        <t t-set="product" t-value="barcode_and_qty_by_pr oduct[0]"/>

        <t t-foreach="barcode_and_qty_by_ product[1]" t-as="product_info">

            <t t-set="barcode" t-value="product_info['barcode ']"/>

            <t t-set="currency_id" t-value="pricelist.currency_id or product.currency_id"/>

            <t t-foreach="range(product_info[ 'quantity'])" t-as="qty">

                <t t-translation="off">

^XA


^FX Second section with recipient address and permit information.

^CFJ,250

^FO50,100^FD<t t-out="product_info['display_n ame_markup']"/>^FS


^XZ

                </t>

            </t>

        </t>

    </t>

</t>

0
Avatar
Discard
Avatar
Cédric Paradis
Best Answer

I've had to do something similar and it required creating a new label, since the product label has no reference to the picking when printed. You'll need to create a label for stock.picking and then iterate over the products/move lines in the transfer.

From the transfer, you'll be able to pull the contact (res.partner) info since it has a One2Many relationship to the contact.

I've made an ASN label in the past which takes a delivery order and prints a zpl label for each move line (so each product + lot combination) with some contact info. It shows how to tell the printer to start a new label and how to go over each product in a stock.picking

<t t-name="stock.label_ASN_template_view">
    <t t-foreach="docs" t-as="transfer">
        <t t-set="contact_name" t-value="transfer.partner_id.commercial_company_name"/>
        <t t-set="contact_street" t-value="transfer.partner_id.street"/>
        <t t-set="contact_city" t-value="transfer.partner_id.city"/>
        <t t-set="contact_zip" t-value="transfer.partner_id.zip"/>
        <t t-set="contact_state" t-value="transfer.partner_id.state_id.code"/>
        <t t-set="contact_country" t-value="transfer.partner_id.country_code"/>
        <t t-set="carrier" t-value="transfer.x_studio_transporteur"/>
        <t t-set="PO" t-value="transfer.sale_id.client_order_ref"/>
        <t t-translations="off">
            <t t-foreach="transfer.move_ids" t-as="move">
                <t t-foreach="move.move_line_ids" t-as="line">
           
^XACI28

^FX Border Definitions
^FX From field
^FO2,4
^GB254,203,2
^FS

^FX To field
^FO254,4
^GB558,203,2
^FS

^FX Postal Code field
^FO2,203
^GB508,206,2
^FS

^FX Carrier info field
^FO508,203
^GB304,206,2
^FS

^FX Product info field
^FO2,409
^GB812,406,2
^FS

^FX MAN Segment field
^FO2,815
^GB812,403,2
^FS

^FX Data definitions
^FX From field
^FO10,16
^A0N,26,26^FB200,1^FDFrom/DE:
^FS

^FO20,50
^A0N,26,26^FB225,5^FDImpress Foods Inc. 1910 rue du Sanctuaire, Quebec, QC G1E 3L2
^FS

^FX To field
^FO264,16
^A0N,26,26^FB200,1^FDTo/A:
^FS

^FO284,50
^A0N,26,26^FB300,5^FD<t t-out="contact_name"/>. <t t-out="contact_street"/>, <t t-out="contact_city"/>, <t t-out="contact_state"/> <t t-out="contact_zip"/>
^FS

^FX Postal code field
^FO10,213
^A0N,26,26^FB500,1^FDShip to Postal Code:
^FS

^FO15,243
^A0N,26,26^FB500,1^FD(420)<t t-out="contact_zip"/>
^FS

^FO90,288
^BCN,100,N,N,Y^FD420<t t-out="contact_zip"/>
^FS

^FX Carrier Field
^FO518,213
^A0N,26,26^FB500,1^FDCarrier:
^FS

^FO518,243
^A0N,26,26^FB500,1^FD<t t-out="carrier"/>
^FS

^FO518,273
^A0N,26,26^FB500,1^FDPro: 12345
^FS

^FO518,303
^A0N,26,26^FB500,1^FDB/L: 123456789
^FS

^FX Product Field
^FO20,439
^A0N,40,40^FB500,1^FDPO: <t t-out="PO"/>
^FS

^FO20,489
^A0N,40,40^FB500,1^FDGTIN: <t t-out="line.product_barcode"/>
^FS

^FO500,489
^A0N,40,40^FB500,1^FDLOT: <t t-out="line.lot_id.display_name"/>
^FS

^FO20,539
^A0N,40,40^FB800,2^FDItem Description: <t t-raw="line.product_id.display_name"/>
^FS

^FO130,639
^A0N,40,40^FB800,1^FDCase QTY: <t t-out="line.quantity"/>
^FS

^FO130,689
^A0N,40,40^FB800,1^FDProduct Net Weight (KG):
^FS

^FO130,739
^A0N,40,40^FB800,1^FDCode Date: <t t-esc="line.lot_id.use_date.strftime('%Y-%m-%d')"/>
^FS

^FX MAN Segment
^FO10,822
^A0N,26,26^FB500,1^FDMAN Segment (SSCC-18):
^FS
^FO110,900
^BCN,225,Y,Y,Y,A^FD(00)003001234000000001

^XZ
                </t>
            </t>
        </t>
    </t>
</t>
0
Avatar
Discard
Avatar
Chad Huskey
Author Best Answer

Just to clarify, we're printing from the delivery ticked so the sales order number would be the Source Document field.

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
how to print product labels on a Zebra LP2824 PLUS?
printing labels
Avatar
Avatar
Avatar
2
अग॰ 24
8160
Problem printing labels
labels zpl IoT
Avatar
Avatar
1
अग॰ 24
2246
How to print lot labels based on quantity received with different UoMs
printing labels Lot/SN
Avatar
0
फ़र॰ 24
1615
Automatically priniting of shipping connector labels
printing shipping labels
Avatar
0
जन॰ 20
366
how to print several labels per product?
product printing labels
Avatar
0
मार्च 15
4364
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • 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