Hello,
I am calling a WhiteList
function in .py file from client script as follows
frappe.call({
method: "mymfg.api.create_route_card",
freeze: true,
args: {
my_work_order: frm.doc.name,
operations: frm.doc.operation
},
callback: function() {
frm.reload_doc();
}
});
I have defined the function in a file api.py
. The function definition is
from __future__ import unicode_literals
import frappe
import json
from frappe.utils import floor, flt, today, cint
from frappe import _
@frappe.whitelist()
def create_route_card(my_work_order, operations):
Here the second parameter is the Child Table operations
that needs to be passed.
When the function create_route_card
is called the error shown is
TypeError: create_route_card() missing 1 required positional argument: 'operations'
What is the problem here?
TIA
Yogi Yang