Merge pull request #4033 from StrellaGroup/develop
[minor] Allow Mapped Doc without Source Document
This commit is contained in:
commit
3d855790ed
1 changed files with 5 additions and 1 deletions
|
|
@ -289,6 +289,10 @@ $.extend(frappe.model, {
|
|||
|
||||
} else if (!opts.source_name && opts.frm) {
|
||||
opts.source_name = opts.frm.doc.name;
|
||||
|
||||
// Allow opening a mapped doc without a source document name
|
||||
} else if (!opts.frm) {
|
||||
opts.source_name = null;
|
||||
}
|
||||
|
||||
return frappe.call({
|
||||
|
|
@ -297,7 +301,7 @@ $.extend(frappe.model, {
|
|||
args: {
|
||||
method: opts.method,
|
||||
source_name: opts.source_name,
|
||||
selected_children: opts.frm.get_selected()
|
||||
selected_children: opts.frm ? opts.frm.get_selected() : null
|
||||
},
|
||||
freeze: true,
|
||||
callback: function(r) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue