Try ERPNext Buy Support Partners Foundation

How to publish progress bar on submit of a doctype

I have a doctype called Wage Compilation I want to show progress bar on submit event.

def generate_pay_book(self):
for w in workers:
paysheet = frappe.get_doc({“doctype”:“Wage PayBook”,…});
I want to show the progress bar here…
//frappe.publish_progress(float(i)*100/len(workers),title = _(‘Creating Records’), doctype=‘Wage PayBook’, docname=‘Wage PayBook’)

Kindly help how to call the progress bar.
Thank You…