Merge pull request #45985 from rohitwaghchaure/fixed-support-31935-1
fix: millisecond issue for posting datetime
This commit is contained in:
@@ -370,3 +370,5 @@ erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter
|
|||||||
erpnext.patches.v14_0.update_stock_uom_in_work_order_item
|
erpnext.patches.v14_0.update_stock_uom_in_work_order_item
|
||||||
erpnext.patches.v14_0.disable_add_row_in_gross_profit
|
erpnext.patches.v14_0.disable_add_row_in_gross_profit
|
||||||
execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment")
|
execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment")
|
||||||
|
erpnext.patches.v14_0.update_posting_datetime
|
||||||
|
|
||||||
|
|||||||
10
erpnext/patches/v14_0/update_posting_datetime.py
Normal file
10
erpnext/patches/v14_0/update_posting_datetime.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.db.sql(
|
||||||
|
"""
|
||||||
|
UPDATE `tabStock Ledger Entry`
|
||||||
|
SET posting_datetime = timestamp(posting_date, posting_time)
|
||||||
|
"""
|
||||||
|
)
|
||||||
@@ -631,4 +631,4 @@ def get_combine_datetime(posting_date, posting_time):
|
|||||||
if isinstance(posting_time, datetime.timedelta):
|
if isinstance(posting_time, datetime.timedelta):
|
||||||
posting_time = (datetime.datetime.min + posting_time).time()
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user