[enhancement] make service type product bundle:

This commit is contained in:
Rushabh Mehta
2015-08-03 11:58:23 +05:30
parent 1385f20042
commit 862a2eb975
6 changed files with 174 additions and 58 deletions

View File

@@ -12,6 +12,23 @@ from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
test_ignore = ["BOM"]
test_dependencies = ["Warehouse"]
def make_item(item_code, properties=None):
if frappe.db.exists("Item", item_code):
return frappe.get_doc("Item", item_code)
item = frappe.get_doc({
"doctype": "Item",
"item_code": item_code,
"item_name": item_code,
"description": item_code,
"item_group": "Products"
})
if properties:
item.update(properties)
item.insert()
return item
class TestItem(unittest.TestCase):
def get_item(self, idx):
item_code = test_records[idx].get("item_code")