diff --git a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py index 6cf0e2e917..930896c91c 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py @@ -12,8 +12,9 @@ from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make class TestLandedCostVoucher(unittest.TestCase): def test_landed_cost_voucher(self): + frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1) set_perpetual_inventory(1) - pr = frappe.copy_doc(pr_test_records[1]) + pr = frappe.copy_doc(pr_test_records[0]) pr.submit() last_sle = frappe.db.get_value("Stock Ledger Entry", { diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index c4c6fa1fe0..7fe2722bae 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -249,6 +249,7 @@ def get_gl_entries(voucher_type, voucher_no): order by account desc""", (voucher_type, voucher_no), as_dict=1) def make_purchase_receipt(**args): + frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1) pr = frappe.new_doc("Purchase Receipt") args = frappe._dict(args) pr.posting_date = args.posting_date or today() diff --git a/erpnext/stock/doctype/purchase_receipt/test_records.json b/erpnext/stock/doctype/purchase_receipt/test_records.json index 315e06a2bf..7c20991a1b 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_records.json +++ b/erpnext/stock/doctype/purchase_receipt/test_records.json @@ -50,10 +50,10 @@ { "base_amount": 250.0, "conversion_factor": 1.0, - "description": "_Test FG Item", + "description": "_Test Item", "doctype": "Purchase Receipt Item", - "item_code": "_Test FG Item", - "item_name": "_Test FG Item", + "item_code": "_Test Item", + "item_name": "_Test Item", "parentfield": "items", "qty": 5.0, "rate": 50.0, @@ -67,10 +67,10 @@ { "base_amount": 250.0, "conversion_factor": 1.0, - "description": "_Test Item", + "description": "_Test Item Home Desktop 100", "doctype": "Purchase Receipt Item", - "item_code": "_Test Item", - "item_name": "_Test Item", + "item_code": "_Test Item Home Desktop 100", + "item_name": "_Test Item Home Desktop 100", "parentfield": "items", "qty": 5.0, "rate": 50.0, @@ -118,4 +118,4 @@ "supplier": "_Test Supplier", "supplier_warehouse": "_Test Warehouse - _TC" } -] +] \ No newline at end of file