mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
[fix] test cases fix for price list
This commit is contained in:
@@ -128,11 +128,6 @@ class DocType(TransactionBase):
|
||||
def delete_customer_contact(self):
|
||||
for rec in sql("select * from `tabContact` where customer=%s", (self.doc.name,), as_dict=1):
|
||||
sql("delete from `tabContact` where name=%s",(rec['name']))
|
||||
|
||||
def delete_customer_communication(self):
|
||||
webnotes.conn.sql("""\
|
||||
delete from `tabCommunication`
|
||||
where customer = %s and supplier is null""", self.doc.name)
|
||||
|
||||
def delete_customer_account(self):
|
||||
"""delete customer's ledger if exist and check balance before deletion"""
|
||||
@@ -145,7 +140,6 @@ class DocType(TransactionBase):
|
||||
def on_trash(self):
|
||||
self.delete_customer_address()
|
||||
self.delete_customer_contact()
|
||||
self.delete_customer_communication()
|
||||
self.delete_customer_account()
|
||||
if self.doc.lead_name:
|
||||
sql("update `tabLead` set status='Interested' where name=%s",self.doc.lead_name)
|
||||
|
||||
@@ -57,6 +57,8 @@ class TestCustomer(unittest.TestCase):
|
||||
# check that old name doesn't exist
|
||||
self.assertEqual(webnotes.conn.exists("Customer", "_Test Customer"), ())
|
||||
self.assertEqual(webnotes.conn.exists("Account", "_Test Customer - _TC"), ())
|
||||
|
||||
test_ignore = ["Price List"]
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
|
||||
Reference in New Issue
Block a user