Merge pull request #16271 from pateljannat/web-form-link-title-doctype-issue

fix: web form link title doctype issue
This commit is contained in:
Saqib Ansari 2022-03-15 15:10:08 +05:30 committed by GitHub
commit da080a4091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -325,6 +325,7 @@ def get_desk_settings():
def get_notification_settings():
return frappe.get_cached_doc('Notification Settings', frappe.session.user)
@frappe.whitelist()
def get_link_title_doctypes():
dts = frappe.get_all("DocType", {"show_title_field_in_link": 1})
custom_dts = frappe.get_all(

View file

@ -82,7 +82,8 @@ frappe.boot = {
time_zone: {
system: "{{ frappe.utils.get_time_zone() }}",
user: "{{ frappe.db.get_value('User', frappe.session.user, 'time_zone') or frappe.utils.get_time_zone() }}"
}
},
link_title_doctypes: `{{ frappe.call('frappe.boot.get_link_title_doctypes') }}`
};
// for backward compatibility of some libs
frappe.sys_defaults = frappe.boot.sysdefaults;