mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
fix: Create Sales Order from Quotation for Prospect
(cherry picked from commit 2f63fae31d)
# Conflicts:
# erpnext/selling/doctype/quotation/quotation.py
This commit is contained in:
@@ -27,6 +27,26 @@ class TestProspect(unittest.TestCase):
|
||||
address_doc.reload()
|
||||
self.assertEqual(address_doc.has_link("Prospect", prospect_doc.name), True)
|
||||
|
||||
def test_make_customer_from_prospect(self):
|
||||
from erpnext.crm.doctype.prospect.prospect import make_customer as make_customer_from_prospect
|
||||
|
||||
frappe.delete_doc_if_exists("Customer", "_Test Prospect")
|
||||
|
||||
prospect = frappe.get_doc({
|
||||
"doctype": "Prospect",
|
||||
"company_name": "_Test Prospect",
|
||||
"customer_group": "_Test Customer Group",
|
||||
})
|
||||
prospect.insert()
|
||||
|
||||
customer = make_customer_from_prospect("_Test Prospect")
|
||||
|
||||
self.assertEqual(customer.doctype, "Customer")
|
||||
self.assertEqual(customer.company_name, "_Test Prospect")
|
||||
self.assertEqual(customer.customer_group, "_Test Customer Group")
|
||||
|
||||
customer.company = "_Test Company"
|
||||
customer.insert()
|
||||
|
||||
def make_prospect(**args):
|
||||
args = frappe._dict(args)
|
||||
|
||||
Reference in New Issue
Block a user