set_item_default was referencing a variable company of "company" (#15576)
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 64a66cf..f32e959 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -951,7 +951,7 @@
return
# no row found, add a new row for the company
- d = item.append('item_defaults', {fieldname: value, company: company})
+ d = item.append('item_defaults', {fieldname: value, "company": company})
d.db_insert()
item.clear_cache()