mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-10 07:33:17 +02:00
fix: validation test for customer group
This commit is contained in:
@@ -324,7 +324,7 @@ def _make_customer(source_name, target_doc=None, ignore_permissions=False):
|
||||
target.customer_name = source.lead_name
|
||||
|
||||
if not target.customer_group:
|
||||
target.customer_group = "Individual"
|
||||
target.customer_group = frappe.db.get_default("Customer Group")
|
||||
|
||||
doclist = get_mapped_doc(
|
||||
"Lead",
|
||||
|
||||
@@ -35,7 +35,9 @@ class TestOpportunity(unittest.TestCase):
|
||||
self.assertEqual(frappe.db.get_value("Lead", opp_doc.party_name, "email_id"), opp_doc.contact_email)
|
||||
|
||||
# create new customer and create new contact against 'new.opportunity@example.com'
|
||||
customer = make_customer(opp_doc.party_name).insert(ignore_permissions=True)
|
||||
customer = make_customer(opp_doc.party_name)
|
||||
customer.customer_group = "Individual"
|
||||
customer.insert(ignore_permissions=True)
|
||||
contact = frappe.get_doc(
|
||||
{
|
||||
"doctype": "Contact",
|
||||
|
||||
Reference in New Issue
Block a user