diff --git a/erpnext/patches.txt b/erpnext/patches.txt index b28d0f23b765159ede784d600e717f41c876fec2..bee3fa68ab78e20b3ed349874721d61fa6a31f3b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -416,4 +416,5 @@ erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_asset_status_to_work_in_progress -erpnext.patches.v15_0.rename_manufacturing_settings_field \ No newline at end of file +erpnext.patches.v15_0.rename_manufacturing_settings_field +erpnext.patches.v14_0.update_posting_datetime \ No newline at end of file diff --git a/erpnext/patches/v14_0/update_posting_datetime.py b/erpnext/patches/v14_0/update_posting_datetime.py new file mode 100644 index 0000000000000000000000000000000000000000..cb28193b74b6d1efb2ca0fa0d78d507874be344f --- /dev/null +++ b/erpnext/patches/v14_0/update_posting_datetime.py @@ -0,0 +1,10 @@ +import frappe + + +def execute(): + frappe.db.sql( + """ + UPDATE `tabStock Ledger Entry` + SET posting_datetime = timestamp(posting_date, posting_time) + """ + ) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 25434a3de3bfc7a58ce6cfe4657af8cea0a95d8a..5de3bda52d124375500215d1f50d0438daaab212 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -666,7 +666,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