diff --git a/frappe/core/doctype/user/user.js b/frappe/core/doctype/user/user.js index cd89a57dfe..f168ad920f 100644 --- a/frappe/core/doctype/user/user.js +++ b/frappe/core/doctype/user/user.js @@ -1,7 +1,7 @@ frappe.ui.form.on("User", { before_load: function (frm) { - var update_tz_select = function (user_language) { - frm.set_df_property("time_zone", "options", [""].concat(frappe.all_timezones)); + let update_tz_options = function () { + frm.fields_dict.time_zone.set_data(frappe.all_timezones); }; if (!frappe.all_timezones) { @@ -9,11 +9,11 @@ frappe.ui.form.on("User", { method: "frappe.core.doctype.user.user.get_timezones", callback: function (r) { frappe.all_timezones = r.message.timezones; - update_tz_select(); + update_tz_options(); }, }); } else { - update_tz_select(); + update_tz_options(); } }, diff --git a/frappe/core/doctype/user/user.json b/frappe/core/doctype/user/user.json index 0396776183..5ed990a794 100644 --- a/frappe/core/doctype/user/user.json +++ b/frappe/core/doctype/user/user.json @@ -191,7 +191,7 @@ }, { "fieldname": "time_zone", - "fieldtype": "Select", + "fieldtype": "Autocomplete", "label": "Time Zone" }, { @@ -762,7 +762,7 @@ "link_fieldname": "user" } ], - "modified": "2023-06-05 17:26:04.127555", + "modified": "2023-09-18 22:19:49.933972", "modified_by": "Administrator", "module": "Core", "name": "User", diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index 33b1cd3bf5..1af7af72e5 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -104,7 +104,7 @@ class User(Document): simultaneous_sessions: DF.Int social_logins: DF.Table[UserSocialLogin] thread_notify: DF.Check - time_zone: DF.Literal + time_zone: DF.Autocomplete | None unsubscribed: DF.Check user_emails: DF.Table[UserEmail] user_image: DF.AttachImage | None