fix: unecessary keyword args were passed in mapper functions (#27563)
This commit is contained in:
parent
d49346ac45
commit
e03d9aa889
@ -714,12 +714,15 @@ erpnext.utils.map_current_doc = function(opts) {
|
|||||||
child_columns: opts.child_columns,
|
child_columns: opts.child_columns,
|
||||||
action: function(selections, args) {
|
action: function(selections, args) {
|
||||||
let values = selections;
|
let values = selections;
|
||||||
if(values.length === 0){
|
if (values.length === 0) {
|
||||||
frappe.msgprint(__("Please select {0}", [opts.source_doctype]))
|
frappe.msgprint(__("Please select {0}", [opts.source_doctype]))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
opts.source_name = values;
|
opts.source_name = values;
|
||||||
|
if (opts.allow_child_item_selection) {
|
||||||
|
// args contains filtered child docnames
|
||||||
opts.args = args;
|
opts.args = args;
|
||||||
|
}
|
||||||
d.dialog.hide();
|
d.dialog.hide();
|
||||||
_map();
|
_map();
|
||||||
},
|
},
|
||||||
|
@ -272,8 +272,9 @@ def update_status(name, status):
|
|||||||
material_request.update_status(status)
|
material_request.update_status(status)
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_purchase_order(source_name, target_doc=None, args={}):
|
def make_purchase_order(source_name, target_doc=None, args=None):
|
||||||
|
if args is None:
|
||||||
|
args = {}
|
||||||
if isinstance(args, string_types):
|
if isinstance(args, string_types):
|
||||||
args = json.loads(args)
|
args = json.loads(args)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user