mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-29 19:48:27 +00:00
refactor(ux): better error message
(cherry picked from commit 3093409933)
This commit is contained in:
@@ -274,14 +274,13 @@ def validate_docs_for_voucher_types(doc_voucher_types):
|
|||||||
if disallowed_types := voucher_types.difference(allowed_types):
|
if disallowed_types := voucher_types.difference(allowed_types):
|
||||||
message = "are" if len(disallowed_types) > 1 else "is"
|
message = "are" if len(disallowed_types) > 1 else "is"
|
||||||
frappe.throw(
|
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))),
|
frappe.bold(comma_and(list(disallowed_types))),
|
||||||
message,
|
message,
|
||||||
frappe.bold(
|
frappe.bold("Allowed Doctype"),
|
||||||
frappe.utils.get_link_to_form(
|
frappe.utils.get_link_to_form("Accounts Settings"),
|
||||||
"Repost Accounting Ledger Settings", "Repost Accounting Ledger Settings"
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user