Merge pull request #24182 from scmmishra/fix-dont-set-primary

This commit is contained in:
Shivam Mishra 2021-01-06 12:52:44 +05:30 committed by GitHub
commit 9fc44f1606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ frappe.ui.form.on('Payroll Entry', {
}
).toggleClass('btn-primary', !(frm.doc.employees || []).length);
}
if ((frm.doc.employees || []).length) {
if ((frm.doc.employees || []).length && !frappe.model.has_workflow(frm.doctype)) {
frm.page.clear_primary_action();
frm.page.set_primary_action(__('Create Salary Slips'), () => {
frm.save('Submit').then(() => {