mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 00:23:21 +00:00
Merge pull request #58474 from frappe/mergify/bp/version-15-hotfix/pr-58469
fix: clarify duplicate internal party messages (backport #58469)
This commit is contained in:
@@ -10,6 +10,7 @@ from frappe.contacts.address_and_contact import (
|
|||||||
load_address_and_contact,
|
load_address_and_contact,
|
||||||
)
|
)
|
||||||
from frappe.model.naming import set_name_by_naming_series, set_name_from_naming_options
|
from frappe.model.naming import set_name_by_naming_series, set_name_from_naming_options
|
||||||
|
from frappe.utils import get_link_to_form
|
||||||
|
|
||||||
from erpnext.accounts.party import (
|
from erpnext.accounts.party import (
|
||||||
get_dashboard_info,
|
get_dashboard_info,
|
||||||
@@ -177,10 +178,15 @@ class Supplier(TransactionBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if internal_supplier:
|
if internal_supplier:
|
||||||
|
internal_supplier_link = get_link_to_form("Supplier", internal_supplier)
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Internal Supplier for company {0} already exists").format(
|
_(
|
||||||
frappe.bold(self.represents_company)
|
"Internal Supplier {0} already exists for {1}. Disable it to make this Supplier internal."
|
||||||
)
|
).format(
|
||||||
|
internal_supplier_link,
|
||||||
|
frappe.bold(self.represents_company),
|
||||||
|
),
|
||||||
|
title=_("Internal Supplier Already Exists"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def create_primary_contact(self):
|
def create_primary_contact(self):
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ from frappe.contacts.address_and_contact import (
|
|||||||
from frappe.model.mapper import get_mapped_doc
|
from frappe.model.mapper import get_mapped_doc
|
||||||
from frappe.model.naming import set_name_by_naming_series, set_name_from_naming_options
|
from frappe.model.naming import set_name_by_naming_series, set_name_from_naming_options
|
||||||
from frappe.model.utils.rename_doc import update_linked_doctypes
|
from frappe.model.utils.rename_doc import update_linked_doctypes
|
||||||
from frappe.utils import cint, cstr, flt, get_formatted_email, today
|
from frappe.utils import cint, cstr, flt, get_formatted_email, get_link_to_form, today
|
||||||
from frappe.utils.deprecations import deprecated
|
from frappe.utils.deprecations import deprecated
|
||||||
from frappe.utils.user import get_users_with_role
|
from frappe.utils.user import get_users_with_role
|
||||||
|
|
||||||
@@ -227,10 +227,15 @@ class Customer(TransactionBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if internal_customer:
|
if internal_customer:
|
||||||
|
internal_customer_link = get_link_to_form("Customer", internal_customer)
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Internal Customer for company {0} already exists").format(
|
_(
|
||||||
frappe.bold(self.represents_company)
|
"Internal Customer {0} already exists for {1}. Disable it to make this Customer internal."
|
||||||
)
|
).format(
|
||||||
|
internal_customer_link,
|
||||||
|
frappe.bold(self.represents_company),
|
||||||
|
),
|
||||||
|
title=_("Internal Customer Already Exists"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user