[fix] Test cases and editable fields settings for request for quotation

This commit is contained in:
Nabin Hait
2016-05-31 19:11:48 +05:30
parent 4eaeda710d
commit 9a5cf6000e
6 changed files with 24 additions and 4 deletions

View File

@@ -36,4 +36,6 @@ class TestShoppingCartSettings(unittest.TestCase):
cart_settings.enabled = 1
if not frappe.db.get_value("Tax Rule", {"use_for_shopping_cart": 1}, "name"):
self.assertRaises(ShoppingCartSetupError, cart_settings.validate_tax_rule)
frappe.db.sql("update `tabTax Rule` set use_for_shopping_cart = 1")

View File

@@ -101,7 +101,7 @@ class TestShoppingCart(unittest.TestCase):
quotation = self.create_quotation()
from erpnext.accounts.party import set_taxes
tax_rule_master = set_taxes(quotation.customer, "Customer", \
quotation.transaction_date, quotation.company, None, None, \
quotation.customer_address, quotation.shipping_address_name, 1)
@@ -131,6 +131,9 @@ class TestShoppingCart(unittest.TestCase):
"taxes": frappe.get_doc("Sales Taxes and Charges Template", "_Test Tax 1").taxes,
"company": "_Test Company"
}
for d in values["taxes"]:
d.name = None
quotation.update(values)