Merge pull request #14164 from rohitwaghchaure/fixed_alias_issue
[Fix] Unknown column 'i.stock_uom' in 'field list'
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 849a294..4a9c029 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -566,7 +566,7 @@
item = frappe.db.sql("""select i.stock_uom, i.description, i.image, i.item_name, i.item_group,
i.has_batch_no, i.sample_quantity, i.has_serial_no,
id.expense_account, id.buying_cost_center
- from `tabItem`, `tabItem Default` id
+ from `tabItem` i, `tabItem Default` id
where i.name=%s and i.name=id.parent and id.company=%s
and i.disabled=0
and (i.end_of_life is null or i.end_of_life='0000-00-00' or i.end_of_life > %s)""",