Skip to content

Commit

Permalink
[FIX]ZPL and PDF: adding binding model
Browse files Browse the repository at this point in the history
  • Loading branch information
jcadhoc committed Jul 20, 2023
1 parent 759264b commit cae2ccd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion product_ux/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Product UX',
'version': "16.0.2.0.0",
'version': "16.0.3.0.0",
'category': 'Products',
'sequence': 14,
'summary': '',
Expand Down
2 changes: 2 additions & 0 deletions product_ux/report/ir.action.reports.xml
Expand Up @@ -20,6 +20,7 @@
<record id="action_custom_label_transfer_template_zpl" model="ir.actions.report">
<field name="name">Etiqueta de despacho (ZPL)</field>
<field name="model">stock.picking</field>
<field name="binding_model_id" ref="stock.model_stock_picking"/>
<field name="report_type">qweb-pdf</field>
<field name="report_name">product_ux.custom_label_transfer_template_view_zpl</field>
<field name="report_file">product_ux.custom_label_transfer_template_view_zpl</field>
Expand All @@ -29,6 +30,7 @@
<record id="action_custom_label_transfer_template_view_pdf" model="ir.actions.report">
<field name="name">Etiqueta de despacho (PDF)</field>
<field name="model">stock.picking</field>
<field name="binding_model_id" ref="stock.model_stock_picking"/>
<field name="report_type">qweb-pdf</field>
<field name="report_name">product_ux.custom_label_transfer_template_view_pdf</field>
<field name="report_file">product_ux.custom_label_transfer_template_view_pdf</field>
Expand Down
6 changes: 5 additions & 1 deletion product_ux/report/picking_templates.xml
Expand Up @@ -2,7 +2,9 @@
<odoo>
<data>
<template id="product_ux.custom_label_transfer_template_view_zpl">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="picking">
<t t-call="web.internal_layout">
<t t-set="numero" t-value="0"/>
<t t-set="qty" t-value="picking.number_of_packages"/>
<t t-if="qty == 0">
Expand Down Expand Up @@ -138,8 +140,10 @@ Fecha
</t>
</t>
</t>
</template>
</t>
</t>

</template>
<template id="product_ux.custom_label_transfer_template_view_pdf">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="picking">
Expand Down

0 comments on commit cae2ccd

Please sign in to comment.