Преглед изворни кода

[minor] Allow Mapped Doc without Source Document

Allow Mapped Doc without Source Document. Used for documents such as Standalone Credit Notes and Standalone Debit Notes (without reference to Sales or Purchase Invoices).
version-14
Javier Wong пре 7 година
родитељ
комит
1b14c5583d
1 измењених фајлова са 5 додато и 1 уклоњено
  1. +5
    -1
      frappe/public/js/frappe/model/create_new.js

+ 5
- 1
frappe/public/js/frappe/model/create_new.js Прегледај датотеку

@@ -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 === undefined) ? null : opts.frm.get_selected()
},
freeze: true,
callback: function(r) {


Loading…
Откажи
Сачувај