[IMP] product_expiry: add expiry date in lot ZPL

Adds "Best before date" and "Expiration Date" on LN/SN ZPL print format.

Task #1938656
This commit is contained in:
svs-odoo
2019-10-25 13:50:37 +00:00
parent 197ef3ea68
commit adbfb968da
@@ -16,4 +16,47 @@
</tr>
</xpath>
</template>
<template id="label_lot_template_view_expiry" inherit_id="stock.label_lot_template_view">
<xpath expr="//t" position="replace">
<t t-foreach="docs" t-as="lot">
<t t-translation="off">
^XA
^FO100,50
^A0N,44,33^FD<t t-esc="lot.product_id.display_name"/>^FS
^FO100,100
^A0N,44,33^FDLN/SN: <t t-esc="lot.name"/>^FS
<t t-if="lot.use_expiration_date and lot.use_date">
^FO100,150
^A0N,44,33^FDBest before: <t t-esc="lot.use_date" t-options='{"widget": "date"}'/>^FS
<t t-if="lot.expiration_date">
^FO100,200
^A0N,44,33^FDUse by: <t t-esc="lot.expiration_date" t-options='{"widget": "date"}'/>^FS
^FO100,250^BY3
^BCN,100,Y,N,N
^FD<t t-esc="lot.name"/>^FS
</t>
<t t-else="">
^FO100,200^BY3
^BCN,100,Y,N,N
^FD<t t-esc="lot.name"/>^FS
</t>
</t>
<t t-elif="lot.use_expiration_date and lot.expiration_date">
^FO100,150
^A0N,44,33^FDUse by: <t t-esc="lot.expiration_date" t-options='{"widget": "date"}'/>^FS
^FO100,200^BY3
^BCN,100,Y,N,N
^FD<t t-esc="lot.name"/>^FS
</t>
<t t-else="">
^FO100,150^BY3
^BCN,100,Y,N,N
^FD<t t-esc="lot.name"/>^FS
</t>
^XZ
</t>
</t>
</xpath>
</template>
</odoo>