mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 23:19:20 +00:00
[material requests] [tests]
This commit is contained in:
@@ -44,23 +44,13 @@ class DocType(BuyingController):
|
||||
utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped",
|
||||
"Cancelled"])
|
||||
|
||||
# Step 2:=> get Purchase Common Obj
|
||||
pc_obj = get_obj(dt='Purchase Common')
|
||||
|
||||
|
||||
# Step 4:=> validate for items
|
||||
pc_obj.validate_for_items(self)
|
||||
|
||||
# Get po date
|
||||
pc_obj.get_prevdoc_date(self)
|
||||
|
||||
# validate_doc
|
||||
|
||||
self.validate_doc(pc_obj)
|
||||
|
||||
# Check for stopped status
|
||||
self.check_for_stopped_status(pc_obj)
|
||||
|
||||
# sub-contracting
|
||||
|
||||
self.validate_for_subcontracting()
|
||||
self.update_raw_materials_supplied("po_raw_material_details")
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ class TestPurchaseOrder(unittest.TestCase):
|
||||
self.assertEquals(po[0]["doctype"], "Purchase Order")
|
||||
self.assertEquals(len(po), len(sq.doclist))
|
||||
|
||||
webnotes.bean(po).insert()
|
||||
|
||||
test_records = [
|
||||
[
|
||||
{
|
||||
@@ -45,7 +47,7 @@ test_records = [
|
||||
"doctype": "Supplier Quotation",
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"transaction_date": "2013-02-12",
|
||||
"is_subcontracted": "Yes",
|
||||
"is_subcontracted": "No",
|
||||
"supplier": "_Test Supplier",
|
||||
"supplier_name": "_Test Supplier",
|
||||
"net_total": 5000.0,
|
||||
|
||||
Reference in New Issue
Block a user