AttributeError: 'module' object has no attribute 'get_suppliers'

Client Side Code
cur_frm.cscript.custom_validate = function(doc) {
method: “get_suppliers”,
args: {
supplier_code: doc.supplier_code,


server side code
def get_suppliers(code)
return {“Code”:code}
Server Error: Please check your server logs or contact tech support.
Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 49, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 66, in handle
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 77, in execute_cmd
method = get_attr(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 98, in get_attr
method = frappe.get_attr(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 519, in get_attr
return getattr(get_module(modulename), methodname)
AttributeError: ‘module’ object has no attribute ‘get_suppliers’


You need to add full path in method like:


Thank you sir,
I got IndentationError: unexpected indent. how to clear that ?

Please free to as Google first