commit | b55dd5b28479482351c7a2c19c899901d5ff311e | [log] [tgz] |
---|---|---|
author | Anand Doshi <anand@erpnext.com> | Mon Jan 04 16:01:51 2016 +0530 |
committer | Anand Doshi <anand@erpnext.com> | Mon Jan 04 16:02:04 2016 +0530 |
tree | 266d7e7fad9ff08ba349278861c7d8f72c79a4c6 | |
parent | cb08d576f6cd8aaba1026fa2c3120d0105aa4525 [diff] |
[fix] BOM validate quantity > 0
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 4b7f7f2..7c47cb8 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -198,6 +198,9 @@ 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'):