Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
685 Zobrazení

I need to do a very basic ZPL label that has the item name and the customer name when printing labels from the delivery ticket.  


Basically I gutted the code on the Product Label to display the item name, but I don't know how to bring in the customer name. 


I've tried everything I can think of to no avail. 


Here's the code I have with just the item name.  So if anyone has any suggestions on what to add to get the company name on there it would be much appreciated!  


<t t-name="stock.label_product_product_view">

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

                <t t-set="product" t-value="barcode_and_qty_by_product[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


^CFJ,250

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


^XZ

                        </t>

                    </t>

                </t>

            </t>

        </t>

Avatar
Zrušit
Nejlepší odpověď

I've had success using

<t t-esc="value"/>

to get values from the records in other labels, including zpl labels

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
led 24
1049
0
čvn 22
1698
0
led 21
2807
0
lis 19
4872
0
bře 25
695