Fixes after change in fields handling in Document

This commit is contained in:
Anand Doshi
2014-03-19 16:58:42 +05:30
parent 76f330ca66
commit 4b2692182a
8 changed files with 21 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ class TestDeliveryNote(unittest.TestCase):
self.assertEquals(len(si), len(dn.doclist))
# modify amount
si[1].rate = 200
si[1]["rate"] = 200
self.assertRaises(frappe.ValidationError, frappe.bean(si).insert)

View File

@@ -124,12 +124,12 @@ class TestMaterialRequest(unittest.TestCase):
# map a purchase order
from erpnext.stock.doctype.material_request.material_request import make_purchase_order
po_doclist = make_purchase_order(mr.doc.name)
po_doclist[0].supplier = "_Test Supplier"
po_doclist[0].transaction_date = "2013-07-07"
po_doclist[1].qty = 27.0
po_doclist[2].qty = 1.5
po_doclist[1].schedule_date = "2013-07-09"
po_doclist[2].schedule_date = "2013-07-09"
po_doclist[0]["supplier"] = "_Test Supplier"
po_doclist[0]["transaction_date"] = "2013-07-07"
po_doclist[1]["qty"] = 27.0
po_doclist[2]["qty"] = 1.5
po_doclist[1]["schedule_date"] = "2013-07-09"
po_doclist[2]["schedule_date"] = "2013-07-09"
# check for stopped status of Material Request

View File

@@ -27,7 +27,7 @@ class TestPurchaseReceipt(unittest.TestCase):
self.assertEquals(len(pi), len(pr.doclist))
# modify rate
pi[1].rate = 200
pi[1]["rate"] = 200
self.assertRaises(frappe.ValidationError, frappe.bean(pi).submit)
def test_purchase_receipt_no_gl_entry(self):

View File

@@ -32,6 +32,7 @@ def get_item_details(args):
if isinstance(args, basestring):
args = json.loads(args)
args = frappe._dict(args)
if not args.get("transaction_type"):