mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
fix(Healthcare): remove hardcoded UOM during Item creation for templates (#21575)
This commit is contained in:
@@ -78,6 +78,8 @@ def create_item_from_template(doc):
|
|||||||
if doc.is_billable:
|
if doc.is_billable:
|
||||||
disabled = 0
|
disabled = 0
|
||||||
|
|
||||||
|
uom = frappe.db.exists('UOM', 'Unit') or frappe.db.get_single_value('Stock Settings', 'stock_uom')
|
||||||
|
|
||||||
#insert item
|
#insert item
|
||||||
item = frappe.get_doc({
|
item = frappe.get_doc({
|
||||||
'doctype': 'Item',
|
'doctype': 'Item',
|
||||||
@@ -92,7 +94,7 @@ def create_item_from_template(doc):
|
|||||||
'show_in_website': 0,
|
'show_in_website': 0,
|
||||||
'is_pro_applicable': 0,
|
'is_pro_applicable': 0,
|
||||||
'disabled': disabled,
|
'disabled': disabled,
|
||||||
'stock_uom': 'Unit'
|
'stock_uom': uom
|
||||||
}).insert(ignore_permissions=True)
|
}).insert(ignore_permissions=True)
|
||||||
|
|
||||||
#insert item price
|
#insert item price
|
||||||
|
|||||||
Reference in New Issue
Block a user