AttributeError: 'Item' object has no attribute(Custom Script Error)

Hi ,
I am trying copy table field values from QC Template Master to item .The child table is Qc Child .I am using the following script
Server Side

 
def qc_template(self):
            if self.qc_template:
                shipping_rule = frappe.get_doc("QC Template Master", self.qc_template)
                frappe.msgprint("from python function")
                for condition in shipping_rule.get("qc_template"):
                    doc_req = {
                        "doctype": "Qc Child Table",
                        "label_lab": condition.label_lab,
                         "label2": condition.label2,
                         "label3": condition.label3,
                         "label4": condition.label4,                    }
                    if (5==5):
                        self.append("table", doc_req)

Client Side:
cur_frm.cscript.qc_template = function(frm) {
               var me = this;
            msgprint("from js function")
            if(5==5) {
                return this.frm.call({
                    doc: this.frm.doc,
                    method: "erpnext.stock.utils.qc_template",
                    callback: function(r) {
                        if(!r.exc) {
                        }
                    }
                })
            }
        }
I am getting the following Error:
"AttributeError: 'Item' object has no attribute 'erpnext.stock.utils.qc_template' "

Please Help .

@Shashank_Mishra please format your script!

@rmehta I have formatted the script .

Use frappe.call instead of this.form.call

this.form.call will look for the method in the class (not as a standard python module)

@rmehta Thanks for the reply.
I made the change but still getting the same error.

Hi ,
I am stuck in here .Can anyone help me with this please ?