28 lines
1.4 KiB
XML
28 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Inherit the delivery slip report template for completed deliveries (state='done') -->
|
|
<template id="stock_report_delivery_has_serial_move_line_custom" inherit_id="stock.stock_report_delivery_has_serial_move_line">
|
|
<!-- Add Production Date after lot number -->
|
|
<xpath expr="//td[@name='move_line_lot']" position="after">
|
|
<td class="text-end">
|
|
<span t-esc="datetime.datetime.now().strftime('%Y-%m-%d')"/>
|
|
</td>
|
|
</xpath>
|
|
<!-- Add Expiration Date after Production Date -->
|
|
<xpath expr="//td[@name='move_line_lot_quantity']" position="before">
|
|
<td class="text-end">
|
|
<span t-esc="(datetime.datetime.now() + datetime.timedelta(days=180)).strftime('%Y-%m-%d')"/>
|
|
</td>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Add column headers for Production and Expiration dates in the main table -->
|
|
<template id="report_delivery_document_custom" inherit_id="stock.report_delivery_document">
|
|
<!-- Add headers for completed deliveries table -->
|
|
<xpath expr="//table[@name='stock_move_line_table']/thead/tr/th[@name='lot_serial']" position="after">
|
|
<th name="th_production_date" class="text-end">Production Date</th>
|
|
<th name="th_expiration_date" class="text-end">Expiration Date</th>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|