Sfoglia il codice sorgente

[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 anni fa
parent
commit
1b14c5583d
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. +5
    -1
      frappe/public/js/frappe/model/create_new.js

+ 5
- 1
frappe/public/js/frappe/model/create_new.js Vedi File

@@ -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) {


Caricamento…
Annulla
Salva