fix: test case
This commit is contained in:
parent
d8163f3e47
commit
82bf59e2a3
@ -16,23 +16,23 @@
|
|||||||
"opportunity_from",
|
"opportunity_from",
|
||||||
"party_name",
|
"party_name",
|
||||||
"customer_name",
|
"customer_name",
|
||||||
|
"status",
|
||||||
"column_break0",
|
"column_break0",
|
||||||
"opportunity_type",
|
"opportunity_type",
|
||||||
"source",
|
"source",
|
||||||
"opportunity_owner",
|
"opportunity_owner",
|
||||||
"column_break_10",
|
"column_break_10",
|
||||||
"status",
|
|
||||||
"sales_stage",
|
"sales_stage",
|
||||||
"expected_closing",
|
"expected_closing",
|
||||||
"probability",
|
"probability",
|
||||||
"organization_details_section",
|
"organization_details_section",
|
||||||
"no_of_employees",
|
"no_of_employees",
|
||||||
"annual_revenue",
|
"annual_revenue",
|
||||||
"column_break_23",
|
|
||||||
"customer_group",
|
"customer_group",
|
||||||
|
"column_break_23",
|
||||||
"industry",
|
"industry",
|
||||||
"column_break_31",
|
|
||||||
"market_segment",
|
"market_segment",
|
||||||
|
"column_break_31",
|
||||||
"territory",
|
"territory",
|
||||||
"website",
|
"website",
|
||||||
"section_break_14",
|
"section_break_14",
|
||||||
@ -607,7 +607,7 @@
|
|||||||
"icon": "fa fa-info-sign",
|
"icon": "fa fa-info-sign",
|
||||||
"idx": 195,
|
"idx": 195,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-06-10 10:37:25.537444",
|
"modified": "2022-06-10 16:19:33.310006",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Opportunity",
|
"name": "Opportunity",
|
||||||
|
@ -97,22 +97,6 @@ class TestOpportunity(unittest.TestCase):
|
|||||||
self.assertEqual(quotation_comment_count, 4)
|
self.assertEqual(quotation_comment_count, 4)
|
||||||
self.assertEqual(quotation_communication_count, 4)
|
self.assertEqual(quotation_communication_count, 4)
|
||||||
|
|
||||||
def test_render_template_for_to_discuss(self):
|
|
||||||
doc = make_opportunity(with_items=0, opportunity_from="Lead")
|
|
||||||
doc.contact_by = "test@example.com"
|
|
||||||
doc.contact_date = add_days(today(), days=2)
|
|
||||||
doc.to_discuss = "{{ doc.name }} test data"
|
|
||||||
doc.save()
|
|
||||||
|
|
||||||
event = frappe.get_all(
|
|
||||||
"Event Participants",
|
|
||||||
fields=["parent"],
|
|
||||||
filters={"reference_doctype": doc.doctype, "reference_docname": doc.name},
|
|
||||||
)
|
|
||||||
|
|
||||||
event_description = frappe.db.get_value("Event", event[0].parent, "description")
|
|
||||||
self.assertTrue(doc.name in event_description)
|
|
||||||
|
|
||||||
|
|
||||||
def make_opportunity_from_lead():
|
def make_opportunity_from_lead():
|
||||||
new_lead_email_id = "new{}@example.com".format(random_string(5))
|
new_lead_email_id = "new{}@example.com".format(random_string(5))
|
||||||
@ -139,7 +123,6 @@ def make_opportunity(**args):
|
|||||||
"opportunity_from": args.opportunity_from or "Customer",
|
"opportunity_from": args.opportunity_from or "Customer",
|
||||||
"opportunity_type": "Sales",
|
"opportunity_type": "Sales",
|
||||||
"conversion_rate": 1.0,
|
"conversion_rate": 1.0,
|
||||||
"with_items": args.with_items or 0,
|
|
||||||
"transaction_date": today(),
|
"transaction_date": today(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
"transaction_date": "2013-12-12",
|
"transaction_date": "2013-12-12",
|
||||||
"items": [{
|
"items": [{
|
||||||
"item_name": "Test Item",
|
"item_name": "Test Item",
|
||||||
"description": "Some description"
|
"description": "Some description",
|
||||||
|
"qty": 5,
|
||||||
|
"rate": 100
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user