mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-28 01:12:06 +02:00
Initial commit: Sale packages
This commit is contained in:
commit
14e3d26998
6469 changed files with 2479670 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="stock_report_delivery_document_inherit_product_expiry" inherit_id="stock.report_delivery_document">
|
||||
<xpath expr="//t[@name='lot_serial']" position="after">
|
||||
<t t-set="has_expiry_date" t-value="False"/>
|
||||
<t t-set="has_expiry_date"
|
||||
t-value="o.move_line_ids.filtered(lambda ml: ml.lot_id.expiration_date)"
|
||||
groups="product_expiry.group_expiry_date_on_delivery_slip"/>
|
||||
<t name="expiry_date" t-if="has_expiry_date">
|
||||
<th>Expiration Date</th>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="stock_report_delivery_has_serial_move_line_inherit_product_expiry" inherit_id="stock.stock_report_delivery_has_serial_move_line">
|
||||
<xpath expr="//t[@name='move_line_lot']" position="after">
|
||||
<t t-if="has_expiry_date">
|
||||
<td><span t-field="move_line.lot_id.expiration_date"/></td>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="report_lot_label_expiry" inherit_id="stock.report_lot_label">
|
||||
<xpath expr="//div[@name='lot_name']" position="after">
|
||||
<t t-if="o.use_expiration_date">
|
||||
<div class="o_label_4x12" t-if="o.use_date">
|
||||
B.b. <t t-out="o.use_date" t-options='{"widget": "date"}'/>
|
||||
</div>
|
||||
<div class="o_label_4x12" t-if="o.expiration_date">
|
||||
Exp. <t t-out="o.expiration_date" t-options='{"widget": "date"}'/>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//t[@name='gs1_datamatrix_lot']" position="before">
|
||||
<t t-if="o.use_expiration_date">
|
||||
<t t-if="o.use_date" t-set="final_barcode" t-value="(final_barcode or '') + '15' + o.use_date.strftime('%y%m%d')"/>
|
||||
<t t-if="o.expiration_date" t-set="final_barcode" t-value="(final_barcode or '') + '17' + o.expiration_date.strftime('%y%m%d')"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="label_lot_template_view_expiry" inherit_id="stock.label_lot_template_view">
|
||||
<xpath expr="//t[@name='datamatrix_lot']" position="before">
|
||||
<t t-if="lot['lot_record'].use_expiration_date">
|
||||
<t t-if="lot['lot_record'].use_date">
|
||||
<t t-set="final_barcode" t-value="(final_barcode or '') + '15' + lot['lot_record'].use_date.strftime('%y%m%d')"/>
|
||||
^FO100,150
|
||||
^A0N,44,33^FDBest before: <t t-out="lot['lot_record'].use_date" t-options='{"widget": "date"}'/>^FS
|
||||
</t>
|
||||
<t t-if="lot['lot_record'].expiration_date">
|
||||
<t t-set="final_barcode" t-value="(final_barcode or '') + '17' + lot['lot_record'].expiration_date.strftime('%y%m%d')"/>
|
||||
<t t-if="not lot['lot_record'].use_date">
|
||||
^FO100,150
|
||||
</t>
|
||||
<t t-else="">
|
||||
^FO100,200
|
||||
</t>
|
||||
^A0N,44,33^FDUse by: <t t-out="lot['lot_record'].expiration_date" t-options='{"widget": "date"}'/>^FS
|
||||
</t>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//t[@name='code128_barcode']" position="before">
|
||||
<t t-elif="lot['lot_record'].use_expiration_date and (lot['lot_record'].use_date or lot['lot_record'].expiration_date)">
|
||||
^FO100,50
|
||||
^A0N,44,33^FD<t t-out="lot['display_name_markup']"/>^FS
|
||||
^FO100,100
|
||||
^A0N,44,33^FDLN/SN: <t t-out="lot['name']"/>^FS
|
||||
<t t-if="lot['lot_record'].use_date">
|
||||
^FO100,150
|
||||
^A0N,44,33^FDBest before: <t t-out="lot['lot_record'].use_date" t-options='{"widget": "date"}'/>^FS
|
||||
<t t-if="lot['lot_record'].expiration_date">
|
||||
^FO100,200
|
||||
^A0N,44,33^FDUse by: <t t-out="lot['lot_record'].expiration_date" t-options='{"widget": "date"}'/>^FS
|
||||
^FO100,250^BY3
|
||||
</t>
|
||||
<t t-else="">
|
||||
^FO100,200^BY3
|
||||
</t>
|
||||
^BCN,100,Y,N,N
|
||||
^FD<t t-out="lot['name']"/>^FS
|
||||
</t>
|
||||
<t t-elif="lot['lot_record'].expiration_date">
|
||||
^FO100,150
|
||||
^A0N,44,33^FDUse by: <t t-out="lot['lot_record'].expiration_date" t-options='{"widget": "date"}'/>^FS
|
||||
^FO100,200^BY3
|
||||
^BCN,100,Y,N,N
|
||||
^FD<t t-out="lot['name']"/>^FS
|
||||
</t>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<odoo>
|
||||
<template id="report_package_barcode_expiry" inherit_id="stock.report_package_barcode">
|
||||
<xpath expr="//t[@name='product_barcode_lot_datamatrix']" position="before">
|
||||
<t t-if="l.use_expiration_date">
|
||||
<t t-if="l.lot_id.use_date" t-set="product_barcode" t-value="product_barcode + '15' + l.lot_id.use_date.strftime('%y%m%d')"/>
|
||||
<t t-if="l.lot_id.expiration_date" t-set="product_barcode" t-value="product_barcode + '17' + l.lot_id.expiration_date.strftime('%y%m%d')"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue