mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
Merge pull request #36389 from AlexandreLumertz/patch-2
fix: Party type translation in error message
This commit is contained in:
@@ -1833,7 +1833,7 @@ def validate_inter_company_party(doctype, party, company, inter_company_referenc
|
|||||||
doc = frappe.get_doc(ref_doc, inter_company_reference)
|
doc = frappe.get_doc(ref_doc, inter_company_reference)
|
||||||
ref_party = doc.supplier if doctype in ["Sales Invoice", "Sales Order"] else doc.customer
|
ref_party = doc.supplier if doctype in ["Sales Invoice", "Sales Order"] else doc.customer
|
||||||
if not frappe.db.get_value(partytype, {"represents_company": doc.company}, "name") == party:
|
if not frappe.db.get_value(partytype, {"represents_company": doc.company}, "name") == party:
|
||||||
frappe.throw(_("Invalid {0} for Inter Company Transaction.").format(partytype))
|
frappe.throw(_("Invalid {0} for Inter Company Transaction.").format(_(partytype)))
|
||||||
if not frappe.get_cached_value(ref_partytype, ref_party, "represents_company") == company:
|
if not frappe.get_cached_value(ref_partytype, ref_party, "represents_company") == company:
|
||||||
frappe.throw(_("Invalid Company for Inter Company Transaction."))
|
frappe.throw(_("Invalid Company for Inter Company Transaction."))
|
||||||
|
|
||||||
@@ -1847,7 +1847,7 @@ def validate_inter_company_party(doctype, party, company, inter_company_referenc
|
|||||||
if not company in companies:
|
if not company in companies:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("{0} not allowed to transact with {1}. Please change the Company.").format(
|
_("{0} not allowed to transact with {1}. Please change the Company.").format(
|
||||||
partytype, company
|
_(partytype), company
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user