fix: Clear invoice table post importing invoices
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
index 7eb5c42..1f41661 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
@@ -22,13 +22,13 @@
}
if (data.user != frappe.session.user) return;
if (data.count == data.total) {
- setTimeout((title) => {
+ setTimeout(() => {
frm.doc.import_in_progress = false;
frm.clear_table("invoices");
frm.refresh_fields();
frm.page.clear_indicator();
- frm.dashboard.hide_progress(title);
- frappe.msgprint(__("Opening {0} Invoice created", [frm.doc.invoice_type]));
+ frm.dashboard.hide_progress();
+ frappe.msgprint(__("Opening {0} Invoices created", [frm.doc.invoice_type]));
}, 1500, data.title);
return;
}
@@ -51,13 +51,6 @@
method: "make_invoices",
freeze: 1,
freeze_message: __("Creating {0} Invoice", [frm.doc.invoice_type]),
- callback: function(r) {
- if (r.message.length == 1) {
- frappe.msgprint(__("{0} Invoice created successfully.", [frm.doc.invoice_type]));
- } else if (r.message.length < 50) {
- frappe.msgprint(__("{0} Invoices created successfully.", [frm.doc.invoice_type]));
- }
- }
});
});
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
index f7df1ff..57fe405 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
@@ -255,8 +255,6 @@
def publish(index, total, doctype):
- if total < 50:
- return
frappe.publish_realtime(
"opening_invoice_creation_progress",
dict(