Merge pull request #6433 from RobertSchouten/validate_sale_ware

[fix] si validate warehouse if is_stock item
This commit is contained in:
Nabin Hait 2016-09-22 11:41:36 +05:30 committed by GitHub
commit d64454b1c1

View File

@ -401,7 +401,7 @@ class SalesInvoice(SellingController):
super(SalesInvoice, self).validate_warehouse()
for d in self.get('items'):
if not d.warehouse:
if not d.warehouse and frappe.db.get_value("Item", d.item_code, "is_stock_item"):
frappe.throw(_("Warehouse required at Row No {0}").format(d.idx))
def validate_delivery_note(self):