fix(control): navigate back to link if new object created from dynamic link

This commit is contained in:
Rushabh Mehta 2019-06-14 15:48:23 +05:30
parent 9fbe0f46d5
commit 4f2b330fc2

View file

@ -233,6 +233,7 @@ frappe.ui.form.remove_old_form_route = () => {
}
frappe.ui.form.update_calling_link = (newdoc) => {
if (!frappe._from_link) return;
var doc = frappe.get_doc(frappe._from_link.doctype, frappe._from_link.docname);
let is_valid_doctype = () => {
@ -244,7 +245,7 @@ frappe.ui.form.update_calling_link = (newdoc) => {
}
};
if (frappe._from_link && is_valid_doctype()) {
if (is_valid_doctype()) {
// set value
if (doc && doc.parentfield) {
//update values for child table