Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] Customization of ZPL report #489

Open
wants to merge 3 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions product_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'views/product_pricelist_item_view.xml',
'views/product_pricelist_view.xml',
'views/uom_uom_views.xml',
'report/picking_templates.xml',
],
'demo': [
],
Expand Down
117 changes: 117 additions & 0 deletions product_ux/report/picking_templates.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0"?>
<t t-name="stock.label_transfer_template_view_zpl">
<t t-foreach="docs" t-as="picking">
<t t-set="numero" t-value="0"/>
<t t-set="qty" t-value="picking.number_of_packages"/>
<t t-if="qty == 0">
<t t-set="qty" t-value="1"/>
</t>
<t t-foreach="range(qty)" t-as="item">
<t t-set="numero" t-value="numero + 1"/>
<t t-translation="off">
^XA
<t t-if="picking.partner_id == True">
^CF0,60^CI28^FO50,50^FD
<t t-esc="picking.partner_id.parent_id != False"/>
^FS ^CF0,30 ^FO50,115^FD
<t t-esc="picking.partner_id.street"/>
^FS ^FO50,155^FD
<t t-esc="picking.partner_id.city"/>
^FS ^FO50,195^FD
<t class="oe_inline" t-esc="picking.partner_id.state_id.name"/>
,
<t class="oe_inline" t-esc="picking.partner_id.name"/>
^FS ^FO50,250^GB700,3,3^FS
</t>
<t t-if="picking.partner_id == False and picking.book_id.company_id != False">
^CF0,60 ^FO50,50^FD^CI33
<t t-esc="picking.book_id.company_id.name"/>
^FS ^CF0,30 ^CI28 ^FO50,115^FD
<t t-esc="picking.book_id.company_id.street"/>
^FS ^FO50,155^FD
<t t-esc="picking.book_id.company_id.city"/>
^FS ^FO50,195^FD
<t class="oe_inline" t-esc="picking.book_id.company_id.state_id.name"/>
,
<t class="oe_inline" t-esc="picking.book_id.company_id.name"/>
^FS ^FO50,250^GB700,3,3^FS
</t>
<t t-else="">
^CF0,60 ^FO50,50^FD
<t t-esc="picking.company_id.name"/>
^FS ^CF0,30 ^CI28 ^FO50,115^FD
<t t-esc="picking.company_id.street"/>
^FS ^FO50,155^FD
<t t-esc="picking.company_id.city"/>
^FS ^FO50,195^FD
<t class="oe_inline" t-esc="picking.company_id.state_id.name"/>
,
<t class="oe_inline" t-esc="picking.company_id.name"/>
^FS ^FO50,250^GB700,3,3^FS
</t>
^FX Second section with recipient address and permit information. ^CFJ,23 ^FO50,280^FDDestinatario^FS ^CF0,45 ^TBN,700,100
<t t-if="picking.partner_id.parent_id">
^FO50,310^FD
<t t-esc="picking.partner_id.parent_id.name"/>
^FS
</t>
<t t-else="">
^FO50,310^FD
<t t-esc="picking.partner_id.name"/>
^FS
</t>
^CF0,30 ^FO50,425^FD
<t t-esc="picking.partner_id.street"/>
^FS ^FO50,465^FD
<t class="oe_inline" t-esc="picking.partner_id.zip"/>
,
<t class="oe_inline" t-esc="picking.partner_id.city"/>
^FS ^FO50,505^FD
<t class="oe_inline" t-esc="picking.partner_id.state_id.name"/>
,
<t class="oe_inline" t-esc="picking.partner_id.country_id.name"/>
^FS ^FO50,545^FDTel: ^FS
<t t-if="picking.partner_id.parent_id and picking.partner_id.parent_id.phone != False">
^FO100,545^FD
<t t-esc="picking.partner_id.parent_id.phone"/>
^FS
</t>
<t t-if="picking.partner_id.parent_id and picking.partner_id.parent_id.mobile != False and picking.partner_id.parent_id.phone == False">
^FO100,545^FD
<t t-esc="picking.partner_id.parent_id.mobile"/>
^FS
</t>
<t t-if="picking.partner_id.parent_id == False and picking.partner_id.mobile != False">
^FO100,545^FD
<t t-esc="picking.partner_id.mobile"/>
^FS
</t>
<t t-if="picking.partner_id.parent_id == False and picking.partner_id.phone != False">
^FO100,545^FD
<t t-esc="picking.partner_id.phone"/>
^FS
</t>
<t t-if="picking.carrier_id">
Transportista:
^FX Transportista ^CFJ,30 ^FO50,615^FDTransportista: ^FS ^FO260,615^FD
<t t-esc="picking.carrier_id.name"/>
</t>
<t t-else="">
</t>
^FS^FS ^FO50,655^GB700,3,3^FS
^FX Referencias Odoo ^CFJ,25 ^FO50,680^FDOrden:^FS ^FO50,720^FDRemito:^FS ^CF0,28 ^FO160,680^FD
<t t-esc="picking.origin"/>
^FS ^FO160,720^FD
<t t-esc="picking.voucher_ids.name"/>
^FS ^BY3,2,160 ^FO100,765^BC^FD
<t t-esc="picking.name"/>
^FS ^FX Fecha y nro de bultos ^FO50,980^GB700,170,3^FS ^FO400,980^GB3,170,3^FS ^CFJ,30 ^FO180,1020^FDBultos^FS
^CF0,50 ^FO160,1070^FD<t t-esc="numero"/> de <t t-if="picking.number_of_packages == 0">1</t><t t-else=""><t t-esc="picking.number_of_packages"/></t>^FS ^CFJ,30 ^FO520,1020^FD
Fecha
^FS ^CF0,50 ^FO460,1070^FD
<t t-esc="picking.date_done" t-options="{'widget': 'date'}"/>
^FS ^XZ
</t>
</t>
</t>
</t>