Hello,
I have a DocType My Work Order
. In the file my_work_order.py
file I have put my code and I am calling the code from the .js file with same name, but am getting error as shown below.
Failed to get method for command mymfg.my_mfg.doctype.my_work_order.create_route_card with module 'mymfg.my_mfg.doctype.my_work_order' has no attribute 'create_route_card'
Code of the .js file
var start_btn = frm.add_custom_button(__('Start Production'), function() {
frappe.call({
method: "mymfg.my_mfg.doctype.my_work_order.create_route_card",
freeze: true,
args: {
my_work_order: frm.doc.name,
operations: frm.doc.operation
},
callback: function() {
frm.reload_doc();
}
});
//frappe.throw(__("This feature will be available once <b>Route Card</b> is functional"));
});
start_btn.addClass('btn-primary');
How to solve this error.
TIA
Yogi Yang