How to call a function with multiple arguments .py file from Client Script?


I am calling a WhiteList function in .py file from client script as follows{
                    method: "mymfg.api.create_route_card",
                    freeze: true,
                    args: {
                        operations: frm.doc.operation
                    callback: function() {

I have defined the function in a file The function definition is

from __future__ import unicode_literals
import frappe
import json
from frappe.utils import floor, flt, today, cint
from frappe import _

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?


Yogi Yang