[Minor] Supplier Group test fix & default supplier in item fix (#14150)

* fix supplier group test

* item - default_supplier fix
This commit is contained in:
Zarrar 2018-05-20 10:46:10 +05:30 committed by Nabin Hait
parent 1f3f18534b
commit 42231df33a
2 changed files with 3 additions and 2 deletions

View File

@ -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"
}
]

View File

@ -251,7 +251,7 @@ def get_basic_details(args, item):
"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,