I got a strange problem while passing arguments from javascript file.
Here’s my js code
frappe.ui.form.on(‘Planning Form’, {
number_of_leaves: function(frm, cdt, cdn) {
var test = locals[cdt][cdn]
frappe.call({
method:“mcs_intech.mrs.doctype.planning_form.planning_form.test_seq”,
args:{
“phase_seq”: “Hello”
},
callback: function(r){
console.log(r)
}
})
}
});
And this is my python function code
@frappe.whitelist()
def test_seq(**args):
print(args, “Working”)
Although there is an argument called “phase_seq” my function returns empty dict like
{} Working
But when i pass argument name in the function like def test_seq(phase_seq):
It prints correctly. I don’t know where i’m doing wrong. Kindly help
Thanks in advance!!