fix: minor fixes

This commit is contained in:
Mangesh-Khairnar 2019-08-31 14:28:02 +05:30
parent e3bb247868
commit dbc69da409
2 changed files with 3 additions and 2 deletions

View File

@ -17,7 +17,8 @@ def execute():
def move_credit_limit_to_child_table():
''' maps data from old field to the new field in the child table '''
if not frappe.db.has_column('Customer', 'bypass_credit_limit_check_at_sales_order'):
fields=""
if frappe.db.has_column('Customer', 'bypass_credit_limit_check_at_sales_order'):
fields = ", bypass_credit_limit_check_at_sales_order"
credit_limit_data = frappe.db.sql(''' SELECT

View File

@ -25,7 +25,7 @@ class TestCustomer(unittest.TestCase):
make_test_records('Item')
def tearDown(self):
frappe.db.set_value("Customer", {'parent': '_Test Customer', 'company': '_Test Company'}, 'credit_limit', 0.0)
frappe.db.set_value("Customer Credit Limit", {'parent': '_Test Customer', 'company': '_Test Company'}, 'credit_limit', 0.0)
def test_party_details(self):
from erpnext.accounts.party import get_party_details