From ba37217944da4b88a736235f8aae6a6a30cea242 Mon Sep 17 00:00:00 2001 From: "Pedram (PEBR)" Date: Thu, 7 Dec 2023 12:18:06 +0100 Subject: [PATCH] [FIX] point_of_sale: enable date search functionality in ticket screen After commit https://github.com/odoo/odoo/commit/4c8fddd57029608bb616c2ff4761b7d41b674986 where `date_order` was transformed to DateTime. This modification eliminates the need for deserializeDateTime during the search process, ensuring accurate date-based search in the ticket screen. opw-3621659 closes odoo/odoo#145399 Signed-off-by: Joseph Caburnay (jcb) --- .../static/src/app/screens/ticket_screen/ticket_screen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.js b/addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.js index 39dea94a85d..31dc2f7bc7c 100644 --- a/addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.js +++ b/addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.js @@ -3,7 +3,7 @@ import { Order } from "@point_of_sale/app/store/models"; import { registry } from "@web/core/registry"; import { useService } from "@web/core/utils/hooks"; -import { deserializeDateTime, deserializeDate, formatDateTime } from "@web/core/l10n/dates"; +import { deserializeDateTime, formatDateTime } from "@web/core/l10n/dates"; import { parseFloat } from "@web/views/fields/parsers"; import { _t } from "@web/core/l10n/translation"; @@ -642,7 +642,7 @@ export class TicketScreen extends Component { modelField: "pos_reference", }, DATE: { - repr: (order) => deserializeDate(order.date_order).toFormat("yyyy-MM-dd HH:mm a"), + repr: (order) => order.date_order.toFormat("yyyy-MM-dd HH:mm a"), displayName: _t("Date"), modelField: "date_order", },