[Minor] Supplier Group test fix & default supplier in item fix (#14150)
* fix supplier group test
* item - default_supplier fix
diff --git a/erpnext/setup/doctype/supplier_group/test_records.json b/erpnext/setup/doctype/supplier_group/test_records.json
index 1681e2a..5848963 100644
--- a/erpnext/setup/doctype/supplier_group/test_records.json
+++ b/erpnext/setup/doctype/supplier_group/test_records.json
@@ -1,7 +1,8 @@
[
{
"doctype": "Supplier Group",
- "supplier_group_name": "_Test Supplier Group"
+ "supplier_group_name": "_Test Supplier Group",
+ "parent_supplier_group": "All Supplier Groups"
}
]
\ No newline at end of file
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 8a194fa..9c40832 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -251,7 +251,7 @@
"net_rate": 0.0,
"net_amount": 0.0,
"discount_percentage": 0.0,
- "supplier": item.default_supplier,
+ "supplier": item_defaults.get("supplier") or '',
"update_stock": args.get("update_stock") if args.get('doctype') in ['Sales Invoice', 'Purchase Invoice'] else 0,
"delivered_by_supplier": item.delivered_by_supplier if args.get("doctype") in ["Sales Order", "Sales Invoice"] else 0,
"is_fixed_asset": item.is_fixed_asset,