Try ERPNext Buy Support Partners Foundation

How to publish progress bar on submit of a doctype

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

on_submit(self):
self.generate_pay_book()
def generate_pay_book(self):
for w in workers:
paysheet = frappe.get_doc({“doctype”:“Wage PayBook”,…});
paysheet.save()
paysheet.submit()
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…