fix: improve condition for routing to newly created doc's form (#37849)
* fix: routing issue * fix: commit suggestion Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com> --------- Co-authored-by: Shankarv19bcr <shankarv292002@gmail.com> Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
This commit is contained in:
parent
78a9d823ea
commit
5ca45fbe72
1 changed files with 5 additions and 1 deletions
|
|
@ -1355,7 +1355,11 @@ frappe.ui.form.Form = class FrappeForm {
|
|||
frappe.re_route[frappe.router.get_sub_path()] = `${encodeURIComponent(
|
||||
frappe.router.slug(this.doctype)
|
||||
)}/${encodeURIComponent(name)}`;
|
||||
!frappe._from_link && frappe.set_route("Form", this.doctype, name);
|
||||
|
||||
// Skip routing only when the document is created from a Form view's Link field
|
||||
if (!frappe._from_link?.field_obj?.frm) {
|
||||
frappe.set_route("Form", this.doctype, name);
|
||||
}
|
||||
}
|
||||
|
||||
// ACTIONS
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue