fix: Let create_item() make items that are fixed assets
This commit is contained in:
parent
3a7f25b218
commit
298b43c177
@ -587,8 +587,8 @@ def make_item_variant():
|
||||
test_records = frappe.get_test_records('Item')
|
||||
|
||||
def create_item(item_code, is_stock_item=1, valuation_rate=0, warehouse="_Test Warehouse - _TC",
|
||||
is_customer_provided_item=None, customer=None, is_purchase_item=None, opening_stock=0,
|
||||
company="_Test Company"):
|
||||
is_customer_provided_item=None, customer=None, is_purchase_item=None, opening_stock=0, is_fixed_asset=0,
|
||||
asset_category=None, company="_Test Company"):
|
||||
if not frappe.db.exists("Item", item_code):
|
||||
item = frappe.new_doc("Item")
|
||||
item.item_code = item_code
|
||||
@ -596,6 +596,8 @@ def create_item(item_code, is_stock_item=1, valuation_rate=0, warehouse="_Test W
|
||||
item.description = item_code
|
||||
item.item_group = "All Item Groups"
|
||||
item.is_stock_item = is_stock_item
|
||||
item.is_fixed_asset = is_fixed_asset
|
||||
item.asset_category = asset_category
|
||||
item.opening_stock = opening_stock
|
||||
item.valuation_rate = valuation_rate
|
||||
item.is_purchase_item = is_purchase_item
|
||||
|
Loading…
x
Reference in New Issue
Block a user