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…

Got any solution? If yes, can you help me with your valuable efforts.

Yes, try this…
n = len(items)
frappe.publish_realtime(“progress”, dict(progress=[count+1, n],title=(‘Creating Attendance Records’)),user=frappe.session.user)
(’{0} Records created’).format(n), title=_(‘Success’), indicator=‘green’)

1 Like