From eaa3849df4b51038e404e12d605358a0665eb3c4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:51:07 +0530 Subject: [PATCH] fix: remove microsecond from posting datetime (backport #40017) (#40022) fix: remove microsecond from posting datetime (#40017) (cherry picked from commit 0b04d04da3bb876080cfc25b8cd889416295ea8f) Co-authored-by: rohitwaghchaure --- erpnext/patches.txt | 2 +- .../v14_0/update_posting_datetime_and_dropped_indexes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index cdfc065a93..3c48be47a2 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -264,7 +264,7 @@ execute:frappe.rename_doc("Report", "TDS Payable Monthly", "Tax Withholding Deta [post_model_sync] execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings') -erpnext.patches.v14_0.update_posting_datetime_and_dropped_indexes +erpnext.patches.v14_0.update_posting_datetime_and_dropped_indexes #22-02-2024 erpnext.patches.v14_0.rename_ongoing_status_in_sla_documents erpnext.patches.v14_0.delete_shopify_doctypes erpnext.patches.v14_0.delete_healthcare_doctypes diff --git a/erpnext/patches/v14_0/update_posting_datetime_and_dropped_indexes.py b/erpnext/patches/v14_0/update_posting_datetime_and_dropped_indexes.py index 6ec3f84200..ca126a40a4 100644 --- a/erpnext/patches/v14_0/update_posting_datetime_and_dropped_indexes.py +++ b/erpnext/patches/v14_0/update_posting_datetime_and_dropped_indexes.py @@ -5,7 +5,7 @@ def execute(): frappe.db.sql( """ UPDATE `tabStock Ledger Entry` - SET posting_datetime = timestamp(posting_date, posting_time) + SET posting_datetime = DATE_FORMAT(timestamp(posting_date, posting_time), '%Y-%m-%d %H:%i:%s') """ )