From 01c1ed98ac3883620ed1c9ebc21eaaf6fd8e8f76 Mon Sep 17 00:00:00 2001 From: Nijith anil <83776819+nijithanil@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:48:32 +0530 Subject: [PATCH] fix(ux): purchase invoice link in error message (#44797) * fix(ux): purchase invoice link in error message * chore: fix linter --------- Co-authored-by: ruthra kumar (cherry picked from commit 6f00a87a9c3036d450dbae22fed53ba8a420b0db) --- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index ebc4efc08a0..dc6ee6c1469 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1677,7 +1677,12 @@ class PurchaseInvoice(BuyingController): if pi: pi = pi[0][0] - frappe.throw(_("Supplier Invoice No exists in Purchase Invoice {0}").format(pi)) + + frappe.throw( + _("Supplier Invoice No exists in Purchase Invoice {0}").format( + get_link_to_form("Purchase Invoice", pi) + ) + ) def update_billing_status_in_pr(self, update_modified=True): if self.is_return and not self.update_billed_amount_in_purchase_receipt: