[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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user