From ba1f40fdd93e1235bda02864b4b1429028a2a63d Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 13 May 2026 13:16:00 +0530 Subject: [PATCH] fix: posting date and time --- erpnext/stock/serial_batch_bundle.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 4949e389b48..cdaf77ef3ef 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -11,6 +11,7 @@ from erpnext.stock.deprecated_serial_batch import ( DeprecatedBatchNoValuation, DeprecatedSerialNoValuation, ) +from erpnext.stock.utils import get_combine_datetime from erpnext.stock.valuation import round_off_if_near_zero CONSUMED_SERIAL_NO_STOCK_ENTRY_PURPOSES = ( @@ -1072,6 +1073,10 @@ class SerialBatchCreation: def set_other_details(self): from erpnext.stock.utils import get_combine_datetime + if not self.get("posting_datetime"): + if self.get("posting_date") and self.get("posting_time"): + self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time) + if not self.get("posting_datetime"): if self.get("posting_date") and self.get("posting_time"): self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time)