Debian Codegraph @

addons/product_expiry/report/report_lot_barcode.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3 <template id="report_lot_label_expiry" inherit_id="stock.report_lot_label">
4 <xpath expr="//div[@name='lot_name']" position="after">
5 <t t-if="o.use_expiration_date">
6 <div class="o_label_4x12" t-if="o.use_date">
7 B.b. <t t-out="o.use_date" t-options='{"widget": "date"}'/>
8 </div>
9 <div class="o_label_4x12" t-if="o.expiration_date">
10 Exp. <t t-out="o.expiration_date" t-options='{"widget": "date"}'/>
11 </div>
12 </t>
13 </xpath>
14 <xpath expr="//t[@name='gs1_datamatrix_lot']" position="before">
15 <t t-if="o.use_expiration_date">
16 <t t-if="o.use_date" t-set="final_barcode" t-value="(final_barcode or '') + '15' + o.use_date.strftime('%y%m%d')"/>
17 <t t-if="o.expiration_date" t-set="final_barcode" t-value="(final_barcode or '') + '17' + o.expiration_date.strftime('%y%m%d')"/>
18 </t>
19 </xpath>
20 </template>
21
22 <template id="label_lot_template_view_expiry" inherit_id="stock.label_lot_template_view">
23 <xpath expr="//t[@name='datamatrix_lot']" position="before">
24 <t t-if="lot['lot_record'].use_expiration_date">
25 <t t-if="lot['lot_record'].use_date">
26 <t t-set="final_barcode" t-value="(final_barcode or '') + '15' + lot['lot_record'].use_date.strftime('%y%m%d')"/>
27 ^FO100,150
28 ^A0N,44,33^FDBest before: <t t-out="lot['lot_record'].use_date" t-options='{"widget": "date"}'/>^FS
29 </t>
30 <t t-if="lot['lot_record'].expiration_date">
31 <t t-set="final_barcode" t-value="(final_barcode or '') + '17' + lot['lot_record'].expiration_date.strftime('%y%m%d')"/>
32 <t t-if="not lot['lot_record'].use_date">
33 ^FO100,150
34 </t>
35 <t t-else="">
36 ^FO100,200
37 </t>
38 ^A0N,44,33^FDUse by: <t t-out="lot['lot_record'].expiration_date" t-options='{"widget": "date"}'/>^FS
39 </t>
40 </t>
41 </xpath>
42 <xpath expr="//t[@name='code128_barcode']" position="before">
43 <t t-elif="lot['lot_record'].use_expiration_date and (lot['lot_record'].use_date or lot['lot_record'].expiration_date)">
44 ^FO100,50
45 ^A0N,44,33^FD<t t-out="lot['display_name_markup']"/>^FS
46 ^FO100,100
47 ^A0N,44,33^FDLN/SN: <t t-out="lot['name']"/>^FS
48 <t t-if="lot['lot_record'].use_date">
49 ^FO100,150
50 ^A0N,44,33^FDBest before: <t t-out="lot['lot_record'].use_date" t-options='{"widget": "date"}'/>^FS
51 <t t-if="lot['lot_record'].expiration_date">
52 ^FO100,200
53 ^A0N,44,33^FDUse by: <t t-out="lot['lot_record'].expiration_date" t-options='{"widget": "date"}'/>^FS
54 ^FO100,250^BY3
55 </t>
56 <t t-else="">
57 ^FO100,200^BY3
58 </t>
59 ^BCN,100,Y,N,N
60 ^FD<t t-out="lot['name']"/>^FS
61 </t>
62 <t t-elif="lot['lot_record'].expiration_date">
63 ^FO100,150
64 ^A0N,44,33^FDUse by: <t t-out="lot['lot_record'].expiration_date" t-options='{"widget": "date"}'/>^FS
65 ^FO100,200^BY3
66 ^BCN,100,Y,N,N
67 ^FD<t t-out="lot['name']"/>^FS
68 </t>
69 </t>
70 </xpath>
71 </template>
72 </odoo>