Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Modifying the ZPL Labels

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
printinglabelszpl
2 Odpowiedzi
2217 Widoki
Awatar
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
Awatar
Odrzuć
Awatar
Cédric Paradis
Najlepsza odpowiedź

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
Awatar
Odrzuć
Awatar
Chad Huskey
Autor Najlepsza odpowiedź

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

0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
how to print product labels on a Zebra LP2824 PLUS?
printing labels
Awatar
Awatar
Awatar
2
sie 24
8125
Problem printing labels
labels zpl IoT
Awatar
Awatar
1
sie 24
2213
How to print lot labels based on quantity received with different UoMs
printing labels Lot/SN
Awatar
0
lut 24
1576
Automatically priniting of shipping connector labels
printing shipping labels
Awatar
0
sty 20
366
how to print several labels per product?
product printing labels
Awatar
0
mar 15
4329
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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