fix: Add translation for showing mandatory fields in error msg

(cherry picked from commit f42ec6a124)
This commit is contained in:
Abdeali Chharchhoda
2024-11-27 16:53:50 +05:30
committed by ruthra kumar
parent 627a50e7bc
commit de5b253215

View File

@@ -455,7 +455,9 @@ def _make_customer(source_name, ignore_permissions=False):
raise
except frappe.MandatoryError as e:
mandatory_fields = e.args[0].split(":")[1].split(",")
mandatory_fields = [customer.meta.get_label(field.strip()) for field in mandatory_fields]
mandatory_fields = [
_(customer.meta.get_label(field.strip())) for field in mandatory_fields
]
frappe.local.message_log = []
lead_link = frappe.utils.get_link_to_form("Lead", lead_name)