fix: millisecond issue for posting datetime

This commit is contained in:
Rohit Waghchaure
2025-02-18 13:56:00 +05:30
parent a81867bc43
commit ac9e5c0163
3 changed files with 13 additions and 2 deletions

View File

@@ -399,4 +399,5 @@ erpnext.patches.v15_0.rename_manufacturing_settings_field
erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect
erpnext.patches.v15_0.sync_auto_reconcile_config
execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment")
erpnext.patches.v14_0.disable_add_row_in_gross_profit
erpnext.patches.v14_0.disable_add_row_in_gross_profit
erpnext.patches.v14_0.update_posting_datetime

View File

@@ -0,0 +1,10 @@
import frappe
def execute():
frappe.db.sql(
"""
UPDATE `tabStock Ledger Entry`
SET posting_datetime = timestamp(posting_date, posting_time)
"""
)

View File

@@ -663,7 +663,7 @@ def get_combine_datetime(posting_date, posting_time):
if isinstance(posting_time, datetime.timedelta):
posting_time = (datetime.datetime.min + posting_time).time()
return datetime.datetime.combine(posting_date, posting_time).replace(microsecond=0)
return datetime.datetime.combine(posting_date, posting_time)
@frappe.request_cache