From 7308021aa8d34ae29ee8a4fe1bf11ab46ca75beb Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 2 Jan 2026 19:32:39 +0530 Subject: [PATCH] fix: use SABB posting_datetime instead of posting_date --- .../serial_no_and_batch_traceability.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/report/serial_no_and_batch_traceability/serial_no_and_batch_traceability.py b/erpnext/stock/report/serial_no_and_batch_traceability/serial_no_and_batch_traceability.py index 7a79887c408..c2382974a02 100644 --- a/erpnext/stock/report/serial_no_and_batch_traceability/serial_no_and_batch_traceability.py +++ b/erpnext/stock/report/serial_no_and_batch_traceability/serial_no_and_batch_traceability.py @@ -85,7 +85,7 @@ class ReportData: "reference_doctype": sabb.reference_doctype, "reference_name": sabb.reference_name, "item_name": sabb.item_name, - "posting_date": sabb.posting_date, + "posting_datetime": sabb.posting_datetime, "indent": indent, "direction": direction, "batch_expiry_date": sabb.get("batch_expiry_date"), @@ -355,7 +355,7 @@ class ReportData: SABE.qty, SABB.item_code, SABB.item_name, - SABB.posting_date, + SABB.posting_datetime, SABB.warehouse, ) .where( @@ -363,8 +363,7 @@ class ReportData: & (SABE.docstatus == 1) & (SABB.type_of_transaction == type_of_transaction) ) - .orderby(SABB.posting_date) - .orderby(SABB.posting_time) + .orderby(SABB.posting_datetime) ) query = query.where((SABE.serial_no == value) | (SABE.batch_no == value)) @@ -386,7 +385,7 @@ class ReportData: fg_item.update( { "work_order": ste.work_order, - "posting_date": row.posting_date, + "posting_datetime": row.posting_datetime, "serial_no": serial_no, "batch_no": batch_no, "indent": 0,