[FIX] product_expiry: don't cast datetime in date

The `date` widget, when used with a datetime value, doesn't offset the
value relative to the session timezone. This can lead to strange issue
like this following one

date1 = 12/03/2023 05:34:12
date2 = 12/03/2023 18:34:12
in the deliveryslip report, the datetime are casted as date, they become

date1 = 12/03/2023
date2 = 13/03/2023

closes odoo/odoo#114983

Opw: 3199862
X-original-commit: b6757daac6272092c37024ac2bdd49747177d2bc
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
William Henrotin
2023-03-13 09:45:59 +01:00
parent 80b85bf818
commit 18e920831b
@@ -15,7 +15,7 @@
<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" t-options='{"widget": "date"}'/></td>
<td><span t-field="move_line.lot_id.expiration_date"/></td>
</t>
</xpath>
</template>