Merge branch 'frappe:develop' into develop

This commit is contained in:
Manuel 2021-10-14 11:03:21 +02:00 committed by GitHub
commit 26e508a66f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -36,7 +36,7 @@ frappe.ui.form.on("Print Format", {
else if (frm.doc.custom_format && !frm.doc.raw_printing) {
frm.set_df_property("html", "reqd", 1);
}
if (frappe.perm.has_perm('DocType', 0, 'read', frm.doc.doc_type)) {
if (frappe.model.can_read(frm.doc.doc_type)) {
frappe.db.get_value('DocType', frm.doc.doc_type, 'default_print_format', (r) => {
if (r.default_print_format != frm.doc.name) {
frm.add_custom_button(__("Set as Default"), function () {

View file

@ -56,6 +56,11 @@ $('body').on('click', 'a', function(e) {
return override(e.currentTarget.hash);
}
if (frappe.router.is_app_route(e.currentTarget.pathname)) {
// target has "/app, this is a v2 style route.
return override(e.currentTarget.pathname + e.currentTarget.hash);
}
});
frappe.router = {