From 3ba400a02bdb4e55d25611032b0e4befbb0c2389 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 15 Apr 2026 10:48:37 +0530 Subject: [PATCH] refactor(ux): better error message (cherry picked from commit 3093409933d3634840a07d08425428503b72df7b) --- .../repost_accounting_ledger.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 819ced1c911..d0af5794e09 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -274,14 +274,13 @@ def validate_docs_for_voucher_types(doc_voucher_types): if disallowed_types := voucher_types.difference(allowed_types): message = "are" if len(disallowed_types) > 1 else "is" frappe.throw( - _("{0} {1} not allowed to be reposted. Modify {2} to enable reposting.").format( + _( + "{0} {1} not allowed to be reposted. You can enable it by adding it '{2}' table in {3}." + ).format( frappe.bold(comma_and(list(disallowed_types))), message, - frappe.bold( - frappe.utils.get_link_to_form( - "Repost Accounting Ledger Settings", "Repost Accounting Ledger Settings" - ) - ), + frappe.bold("Allowed Doctype"), + frappe.utils.get_link_to_form("Accounts Settings"), ) )