From ca9b2a953d13a3c2b67a37c9aaba2da0d93fb8cc Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Tue, 4 Jan 2022 13:25:19 +0530 Subject: [PATCH] fix: Add patch to set week_starts_on as "Monday" --- frappe/patches.txt | 1 + frappe/patches/v13_0/set_week_starts_on.py | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 frappe/patches/v13_0/set_week_starts_on.py diff --git a/frappe/patches.txt b/frappe/patches.txt index 27ba1a145d..3bd883aa6d 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -182,6 +182,7 @@ frappe.patches.v13_0.queryreport_columns execute:frappe.reload_doc('core', 'doctype', 'doctype') frappe.patches.v13_0.jinja_hook frappe.patches.v13_0.update_notification_channel_if_empty +frappe.patches.v13_0.set_week_starts_on frappe.patches.v14_0.drop_data_import_legacy frappe.patches.v14_0.rename_cancelled_documents frappe.patches.v14_0.copy_mail_data #08.03.21 diff --git a/frappe/patches/v13_0/set_week_starts_on.py b/frappe/patches/v13_0/set_week_starts_on.py new file mode 100644 index 0000000000..8f90a6b2a8 --- /dev/null +++ b/frappe/patches/v13_0/set_week_starts_on.py @@ -0,0 +1,7 @@ +import frappe + +def execute(): + frappe.reload_doctype("System Settings") + # setting week_starts_on value as "Monday" to avoid breaking change + # because before the configuration was introduced, system used to consider "Monday" as start of the week + frappe.db.set_value("System Settings", "System Settings", "week_starts_on", "Monday") \ No newline at end of file