| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<template id="stock_report_delivery_document_inherit_product_expiry" inherit_id="stock.report_delivery_document"> |
| 4 |
<xpath expr="//th[@name='lot_serial']" position="after"> |
| 5 |
<t t-set="has_expiry_date" t-value="False"/> |
| 6 |
<t t-set="has_expiry_date" |
| 7 |
t-value="o.move_line_ids.filtered(lambda ml: ml.lot_id.expiration_date)" |
| 8 |
groups="product_expiry.group_expiry_date_on_delivery_slip"/> |
| 9 |
<t name="expiry_date" t-if="has_expiry_date"> |
| 10 |
<th>Expiration Date</th> |
| 11 |
</t> |
| 12 |
</xpath> |
| 13 |
</template> |
| 14 |
|
| 15 |
<template id="stock_report_delivery_has_serial_move_line_inherit_product_expiry" inherit_id="stock.stock_report_delivery_has_serial_move_line"> |
| 16 |
<xpath expr="//t[@name='move_line_lot']" position="after"> |
| 17 |
<t t-if="has_expiry_date"> |
| 18 |
<td><span t-field="move_line.lot_id.expiration_date" t-options="{'widget': 'date'}"/></td> |
| 19 |
</t> |
| 20 |
</xpath> |
| 21 |
</template> |
| 22 |
</odoo> |