[fix] BOM validate quantity > 0

This commit is contained in:
Anand Doshi 2016-01-04 16:01:51 +05:30
parent cb08d576f6
commit b55dd5b284

View File

@ -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'):