mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
Fixes after change in fields handling in Document
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user