From b55dd5b28479482351c7a2c19c899901d5ff311e Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 4 Jan 2016 16:01:51 +0530 Subject: [PATCH] [fix] BOM validate quantity > 0 --- erpnext/manufacturing/doctype/bom/bom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 4b7f7f2bf7f..7c47cb8affc 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -198,6 +198,9 @@ class BOM(Document): self.uom = ret[1] self.item_name= ret[2] + if not self.quantity: + frappe.throw(_("Quantity should be greater than 0")) + def validate_materials(self): """ Validate raw material entries """ if not self.get('items'):