From 2f50cb3e58458a9679bfc6022c15f910b757aa5b Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 15 Sep 2020 15:00:32 +0530 Subject: [PATCH] fix: Supplier trigger onload --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 2bfa4a572ef..fe5301d5c83 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -28,7 +28,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ // Trigger supplier event on load if supplier is available // The reason for this is PI can be created from PR or PO and supplier is pre populated - if (this.frm.doc.supplier) { + if (this.frm.doc.supplier && this.frm.doc.__islocal) { this.frm.trigger('supplier'); } },