Merge branch 'frappe:develop' into develop
This commit is contained in:
commit
26e508a66f
2 changed files with 6 additions and 1 deletions
|
|
@ -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 () {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue