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 7eb5c4234d1..e9612c36027 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 @@ -20,7 +20,6 @@ frappe.ui.form.on('Opening Invoice Creation Tool', { frm.dashboard.reset(); frm.doc.import_in_progress = true; } - if (data.user != frappe.session.user) return; if (data.count == data.total) { setTimeout((title) => { frm.doc.import_in_progress = false; 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 0f0ab68dcb8..510b69c96d5 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 @@ -271,10 +271,10 @@ def publish(index, total, doctype): dict( title=_("Opening Invoice Creation In Progress"), message=_("Creating {} out of {} {}").format(index + 1, total, doctype), - user=frappe.session.user, count=index + 1, total=total, ), + user=frappe.session.user, ) diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js index 1d596c1bfbb..e6d9fe2b54d 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js @@ -25,7 +25,7 @@ frappe.ui.form.on('POS Closing Entry', { frappe.realtime.on('closing_process_complete', async function(data) { await frm.reload_doc(); - if (frm.doc.status == 'Failed' && frm.doc.error_message && data.user == frappe.session.user) { + if (frm.doc.status == 'Failed' && frm.doc.error_message) { frappe.msgprint({ title: __('POS Closing Failed'), message: frm.doc.error_message, diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index f6002163f0f..fc356f2378d 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -432,7 +432,7 @@ def create_merge_logs(invoice_by_customer, closing_entry=None): finally: frappe.db.commit() - frappe.publish_realtime("closing_process_complete", {"user": frappe.session.user}) + frappe.publish_realtime("closing_process_complete", user=frappe.session.user) def cancel_merge_logs(merge_logs, closing_entry=None): @@ -459,7 +459,7 @@ def cancel_merge_logs(merge_logs, closing_entry=None): finally: frappe.db.commit() - frappe.publish_realtime("closing_process_complete", {"user": frappe.session.user}) + frappe.publish_realtime("closing_process_complete", user=frappe.session.user) def enqueue_job(job, **kwargs): diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py index b93c5c4d38c..da5699776fd 100644 --- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py +++ b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py @@ -1345,7 +1345,7 @@ class QuickBooksMigrator(Document): )[0]["name"] def _publish(self, *args, **kwargs): - frappe.publish_realtime("quickbooks_progress_update", *args, **kwargs) + frappe.publish_realtime("quickbooks_progress_update", *args, **kwargs, user=self.modified_by) def _get_unique_account_name(self, quickbooks_name, number=0): if number: diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py index 833bbdfa3f3..7682cd0fe80 100644 --- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py +++ b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py @@ -302,6 +302,7 @@ class TallyMigration(Document): frappe.publish_realtime( "tally_migration_progress_update", {"title": title, "message": message, "count": count, "total": total}, + user=self.modified_by, ) def _import_master_data(self): diff --git a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py index 77c4d7c6ca3..6db213aa275 100644 --- a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py +++ b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py @@ -146,7 +146,9 @@ class ImportSupplierInvoice(Document): def publish(self, title, message, count, total): frappe.publish_realtime( - "import_invoice_update", {"title": title, "message": message, "count": count, "total": total} + "import_invoice_update", + {"title": title, "message": message, "count": count, "total": total}, + user=self.modified_by, )