refactor!: Make required changes to create SCO from PO

This commit is contained in:
Sagar Sharma
2022-05-05 19:41:05 +05:30
parent f94d607288
commit 77db843692
11 changed files with 182 additions and 86 deletions

View File

@@ -237,8 +237,8 @@ def validate_item_details(args, item):
throw(_("Item {0} is a template, please select one of its variants").format(item.name))
elif args.transaction_type == "buying" and args.doctype != "Material Request":
if args.get("is_subcontracted") == "Yes" and item.is_sub_contracted_item != 1:
throw(_("Item {0} must be a Sub-contracted Item").format(item.name))
if args.get("is_subcontracted") == "Yes" and item.is_stock_item:
throw(_("Item {0} must be a Non-Stock Item").format(item.name))
def get_basic_details(args, item, overwrite_warehouse=True):