Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Guest House
    • Drankenhandelaar
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Solar Energy Systems
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC Services
    Others
    • Nonprofit Organization
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Modifying the ZPL Labels

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
printinglabelszpl
2 Antwoorden
2219 Weergaven
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
Annuleer
Avatar
Cédric Paradis
Beste antwoord

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
Annuleer
Avatar
Chad Huskey
Auteur Beste antwoord

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

0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
how to print product labels on a Zebra LP2824 PLUS?
printing labels
Avatar
Avatar
Avatar
2
aug. 24
8126
Problem printing labels
labels zpl IoT
Avatar
Avatar
1
aug. 24
2214
How to print lot labels based on quantity received with different UoMs
printing labels Lot/SN
Avatar
0
feb. 24
1576
Automatically priniting of shipping connector labels
printing shipping labels
Avatar
0
jan. 20
366
how to print several labels per product?
product printing labels
Avatar
0
mrt. 15
4329
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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