[fix] test cases fix for price list
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index 75b2e03..1fd2d0c 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -135,11 +135,6 @@
for rec in sql("select * from `tabContact` where supplier=%s", (self.doc.name,), as_dict=1):
sql("delete from `tabContact` where name=%s",(rec['name']))
- def delete_supplier_communication(self):
- webnotes.conn.sql("""\
- delete from `tabCommunication`
- where supplier = %s and customer is null""", self.doc.name)
-
def delete_supplier_account(self):
"""delete supplier's ledger if exist and check balance before deletion"""
acc = sql("select name from `tabAccount` where master_type = 'Supplier' \
@@ -151,7 +146,6 @@
def on_trash(self):
self.delete_supplier_address()
self.delete_supplier_contact()
- self.delete_supplier_communication()
self.delete_supplier_account()
def on_rename(self, new, old, merge=False):
diff --git a/selling/doctype/customer/customer.py b/selling/doctype/customer/customer.py
index fb3c006..8c42a71 100644
--- a/selling/doctype/customer/customer.py
+++ b/selling/doctype/customer/customer.py
@@ -128,11 +128,6 @@
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 @@
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)
diff --git a/selling/doctype/customer/test_customer.py b/selling/doctype/customer/test_customer.py
index 9ed821a..7c90f6a 100644
--- a/selling/doctype/customer/test_customer.py
+++ b/selling/doctype/customer/test_customer.py
@@ -57,6 +57,8 @@
# 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 = [
[{
diff --git a/setup/doctype/customer_group/test_customer_group.py b/setup/doctype/customer_group/test_customer_group.py
index 14233af..11140d6 100644
--- a/setup/doctype/customer_group/test_customer_group.py
+++ b/setup/doctype/customer_group/test_customer_group.py
@@ -1,6 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
+test_ignore = ["Price List"]
+
+
test_records = [
[{
"doctype": "Customer Group",
diff --git a/setup/doctype/price_list/test_price_list.py b/setup/doctype/price_list/test_price_list.py
index 2310f51..b1174d3 100644
--- a/setup/doctype/price_list/test_price_list.py
+++ b/setup/doctype/price_list/test_price_list.py
@@ -13,6 +13,8 @@
price_list.doclist.append(webnotes.doc(item_price.fields.copy()))
self.assertRaises(PriceListDuplicateItem, price_list.insert)
+# test_ignore = ["Item"]
+
test_records = [
[
{
diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py
index 54c0e28..0bc2f24 100644
--- a/setup/doctype/setup_control/setup_control.py
+++ b/setup/doctype/setup_control/setup_control.py
@@ -101,7 +101,6 @@
'default_currency': args.get('currency'),
'default_company':args.get('company_name'),
'date_format': webnotes.conn.get_value("Country", args.get("country"), "date_format"),
- 'emp_created_by':'Naming Series',
"float_precision": 4
})
global_defaults.save()
@@ -135,6 +134,10 @@
notification_control.doc.purchase_order = 1
notification_control.save()
+ hr_settings = webnotes.bean("HR Settings")
+ hr_settings.doc.emp_created_by = "Naming Series"
+ hr_settings.save()
+
# control panel
cp = webnotes.doc("Control Panel", "Control Panel")
for k in ['country', 'timezone', 'company_name']: