mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix(test): Test cases fixed
This commit is contained in:
@@ -859,7 +859,8 @@ def make_stock_entry(source_name, target_doc=None):
|
|||||||
"Purchase Invoice Item": {
|
"Purchase Invoice Item": {
|
||||||
"doctype": "Stock Entry Detail",
|
"doctype": "Stock Entry Detail",
|
||||||
"field_map": {
|
"field_map": {
|
||||||
"stock_qty": "transfer_qty"
|
"stock_qty": "transfer_qty",
|
||||||
|
"batch_no": "batch_no"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}, target_doc)
|
}, target_doc)
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
"rate": 5000.0,
|
"rate": 5000.0,
|
||||||
"uom": "_Test UOM",
|
"uom": "_Test UOM",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
"source_warehouse": "_Test Warehouse - _TC"
|
"source_warehouse": "_Test Warehouse - _TC",
|
||||||
|
"allow_transfer_for_manufacture": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amount": 2000.0,
|
"amount": 2000.0,
|
||||||
@@ -21,7 +22,8 @@
|
|||||||
"rate": 1000.0,
|
"rate": 1000.0,
|
||||||
"uom": "_Test UOM",
|
"uom": "_Test UOM",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
"source_warehouse": "_Test Warehouse - _TC"
|
"source_warehouse": "_Test Warehouse - _TC",
|
||||||
|
"allow_transfer_for_manufacture": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
@@ -54,7 +56,8 @@
|
|||||||
"rate": 5000.0,
|
"rate": 5000.0,
|
||||||
"uom": "_Test UOM",
|
"uom": "_Test UOM",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
"source_warehouse": "_Test Warehouse - _TC"
|
"source_warehouse": "_Test Warehouse - _TC",
|
||||||
|
"allow_transfer_for_manufacture": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amount": 2000.0,
|
"amount": 2000.0,
|
||||||
@@ -65,7 +68,8 @@
|
|||||||
"rate": 1000.0,
|
"rate": 1000.0,
|
||||||
"uom": "_Test UOM",
|
"uom": "_Test UOM",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
"source_warehouse": "_Test Warehouse - _TC"
|
"source_warehouse": "_Test Warehouse - _TC",
|
||||||
|
"allow_transfer_for_manufacture": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
@@ -97,7 +101,8 @@
|
|||||||
"rate": 5000.0,
|
"rate": 5000.0,
|
||||||
"uom": "_Test UOM",
|
"uom": "_Test UOM",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
"source_warehouse": "_Test Warehouse - _TC"
|
"source_warehouse": "_Test Warehouse - _TC",
|
||||||
|
"allow_transfer_for_manufacture": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amount": 3000.0,
|
"amount": 3000.0,
|
||||||
@@ -109,7 +114,8 @@
|
|||||||
"rate": 1000.0,
|
"rate": 1000.0,
|
||||||
"uom": "_Test UOM",
|
"uom": "_Test UOM",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
"source_warehouse": "_Test Warehouse - _TC"
|
"source_warehouse": "_Test Warehouse - _TC",
|
||||||
|
"allow_transfer_for_manufacture": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
@@ -143,7 +149,8 @@
|
|||||||
"rate": 3000.0,
|
"rate": 3000.0,
|
||||||
"uom": "_Test UOM",
|
"uom": "_Test UOM",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
"source_warehouse": "_Test Warehouse - _TC"
|
"source_warehouse": "_Test Warehouse - _TC",
|
||||||
|
"allow_transfer_for_manufacture": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@@ -931,6 +932,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_from": "item_code.allow_transfer_for_manufacture",
|
||||||
"fieldname": "allow_transfer_for_manufacture",
|
"fieldname": "allow_transfer_for_manufacture",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1033,8 +1035,8 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-09-16 19:59:36.636884",
|
"modified": "2018-11-22 15:04:55.187136",
|
||||||
"modified_by": "clarkejjm@gmail.com",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Item",
|
"name": "BOM Item",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ def make_bom(**args):
|
|||||||
'qty': 1,
|
'qty': 1,
|
||||||
'uom': item_doc.stock_uom,
|
'uom': item_doc.stock_uom,
|
||||||
'stock_uom': item_doc.stock_uom,
|
'stock_uom': item_doc.stock_uom,
|
||||||
'rate': item_doc.valuation_rate or args.rate
|
'rate': item_doc.valuation_rate or args.rate,
|
||||||
})
|
})
|
||||||
|
|
||||||
bom.insert(ignore_permissions=True)
|
bom.insert(ignore_permissions=True)
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ class TestWorkOrder(unittest.TestCase):
|
|||||||
make_bom(item=fg_item, rate=1000, raw_materials = ['_Test FG Item', '_Test FG Non Stock Item'])
|
make_bom(item=fg_item, rate=1000, raw_materials = ['_Test FG Item', '_Test FG Non Stock Item'])
|
||||||
|
|
||||||
wo = make_wo_order_test_record(production_item = fg_item)
|
wo = make_wo_order_test_record(production_item = fg_item)
|
||||||
|
|
||||||
se = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 1))
|
se = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 1))
|
||||||
se.insert()
|
se.insert()
|
||||||
se.submit()
|
se.submit()
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
"show_in_website": 1,
|
"show_in_website": 1,
|
||||||
"website_warehouse": "_Test Warehouse - _TC",
|
"website_warehouse": "_Test Warehouse - _TC",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -78,6 +79,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test Item Home Desktop 100",
|
"item_name": "_Test Item Home Desktop 100",
|
||||||
"valuation_rate": 100,
|
"valuation_rate": 100,
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -107,6 +109,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test Item Home Desktop 200",
|
"item_name": "_Test Item Home Desktop 200",
|
||||||
"stock_uom": "_Test UOM 1",
|
"stock_uom": "_Test UOM 1",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -128,6 +131,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test Product Bundle Item",
|
"item_name": "_Test Product Bundle Item",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -149,6 +153,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test FG Item",
|
"item_name": "_Test FG Item",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -170,6 +175,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test Non Stock Item",
|
"item_name": "_Test Non Stock Item",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -191,6 +197,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test Serialized Item",
|
"item_name": "_Test Serialized Item",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -213,6 +220,7 @@
|
|||||||
"item_name": "_Test Serialized Item With Series",
|
"item_name": "_Test Serialized Item With Series",
|
||||||
"serial_no_series": "ABCD.#####",
|
"serial_no_series": "ABCD.#####",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -234,6 +242,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test Item Home Desktop Manufactured",
|
"item_name": "_Test Item Home Desktop Manufactured",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -255,6 +264,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test FG Item 2",
|
"item_name": "_Test FG Item 2",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse - _TC",
|
"default_warehouse": "_Test Warehouse - _TC",
|
||||||
@@ -276,6 +286,7 @@
|
|||||||
"item_group": "_Test Item Group Desktops",
|
"item_group": "_Test Item Group Desktops",
|
||||||
"item_name": "_Test Variant Item",
|
"item_name": "_Test Variant Item",
|
||||||
"stock_uom": "_Test UOM",
|
"stock_uom": "_Test UOM",
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"has_variants": 1,
|
"has_variants": 1,
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
@@ -312,6 +323,7 @@
|
|||||||
"item_group": "_Test Item Group",
|
"item_group": "_Test Item Group",
|
||||||
"item_name": "_Test Item Warehouse Group Wise Reorder",
|
"item_name": "_Test Item Warehouse Group Wise Reorder",
|
||||||
"apply_warehouse_wise_reorder_level": 1,
|
"apply_warehouse_wise_reorder_level": 1,
|
||||||
|
"gst_hsn_code": "999800",
|
||||||
"item_defaults": [{
|
"item_defaults": [{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"default_warehouse": "_Test Warehouse Group-C1 - _TC",
|
"default_warehouse": "_Test Warehouse Group-C1 - _TC",
|
||||||
|
|||||||
Reference in New Issue
Block a user