From f225e1986ee3109d77bb09187868204eeb7cefac Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 10:31:28 +0530 Subject: [PATCH] fix: validation message format (backport #47542) (#47549) fix: validation message format (#47542) (cherry picked from commit a18e1cffa7ce0eff12ba7d91b40fc8a4f85cf584) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/stock_entry/stock_entry.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index cf1bb9a3229..45afd1a0ad4 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -520,17 +520,19 @@ class StockEntry(StockController): if acc_details.account_type == "Stock": frappe.throw( _( - "At row {0}: the Difference Account must not be a Stock type account, please change the Account Type for the account {1} or select a different account" + "At row #{0}: the Difference Account must not be a Stock type account, please change the Account Type for the account {1} or select a different account" ).format(d.idx, get_link_to_form("Account", d.expense_account)), - OpeningEntryAccountError, + title=_("Difference Account in Items Table"), ) if self.purpose != "Material Issue" and acc_details.account_type == "Cost of Goods Sold": frappe.msgprint( _( - "At row {0}: You have selected the Difference Account {1}, which is a Cost of Goods Sold type account. Please select a different account" + "At row #{0}: you have selected the Difference Account {1}, which is a Cost of Goods Sold type account. Please select a different account" ).format(d.idx, bold(get_link_to_form("Account", d.expense_account))), - title=_("Warning : Cost of Goods Sold Account"), + title=_("Cost of Goods Sold Account in Items Table"), + indicator="orange", + alert=1, ) def validate_warehouse(self):