diff --git a/frappe/core/doctype/system_settings/system_settings.json b/frappe/core/doctype/system_settings/system_settings.json
index 82e88d2477..d4b7272dd3 100644
--- a/frappe/core/doctype/system_settings/system_settings.json
+++ b/frappe/core/doctype/system_settings/system_settings.json
@@ -66,7 +66,9 @@
"attach_view_link",
"prepared_report_section",
"enable_prepared_report_auto_deletion",
- "prepared_report_expiry_period"
+ "prepared_report_expiry_period",
+ "system_updates_section",
+ "disable_system_update_notification"
],
"fields": [
{
@@ -462,12 +464,23 @@
"fieldname": "encrypt_backup",
"fieldtype": "Check",
"label": "Encrypt Backups"
+ },
+ {
+ "fieldname": "system_updates_section",
+ "fieldtype": "Section Break",
+ "label": "System Updates"
+ },
+ {
+ "default": "0",
+ "fieldname": "disable_system_update_notification",
+ "fieldtype": "Check",
+ "label": "Disable System Update Notification"
}
],
"icon": "fa fa-cog",
"issingle": 1,
"links": [],
- "modified": "2021-10-21 19:24:15.232430",
+ "modified": "2021-11-27 01:17:05.228959",
"modified_by": "Administrator",
"module": "Core",
"name": "System Settings",
diff --git a/frappe/utils/change_log.py b/frappe/utils/change_log.py
index 109778b87b..b4f54e1b20 100644
--- a/frappe/utils/change_log.py
+++ b/frappe/utils/change_log.py
@@ -155,11 +155,11 @@ def check_for_update():
for update_type in updates:
if github_version.__dict__[update_type] > instance_version.__dict__[update_type]:
updates[update_type].append(frappe._dict(
- current_version = str(instance_version),
+ current_version = str(instance_version),
available_version = str(github_version),
- org_name = org_name,
- app_name = app,
- title = apps[app]['title'],
+ org_name = org_name,
+ app_name = app,
+ title = apps[app]['title'],
))
break
if github_version.__dict__[update_type] < instance_version.__dict__[update_type]: break
@@ -242,10 +242,11 @@ def add_message_to_redis(update_json):
@frappe.whitelist()
def show_update_popup():
cache = frappe.cache()
- user = frappe.session.user
+ user = frappe.session.user
+ system_settings = frappe.get_single("System Settings")
update_info = cache.get_value("update-info")
- if not update_info:
+ if not update_info or system_settings.disable_system_update_notification:
return
updates = json.loads(update_info)
@@ -259,9 +260,9 @@ def show_update_popup():
app = frappe._dict(app)
release_links += "{title}: v{available_version}
".format(
available_version = app.available_version,
- org_name = app.org_name,
- app_name = app.app_name,
- title = app.title
+ org_name = app.org_name,
+ app_name = app.app_name,
+ title = app.title
)
if release_links:
message = _("New {} releases for the following apps are available").format(_(update_type))