From 252d14a85e9a1605ac6506d35fccb0d5691bd68c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Aug 2013 11:52:17 +0530 Subject: [PATCH] [fix] [minor] validate warehouse user for sales order --- selling/doctype/sales_order/sales_order.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selling/doctype/sales_order/sales_order.py b/selling/doctype/sales_order/sales_order.py index ec2406f051..8e3ed701ff 100644 --- a/selling/doctype/sales_order/sales_order.py +++ b/selling/doctype/sales_order/sales_order.py @@ -152,7 +152,8 @@ class DocType(SellingController): def validate_warehouse_user(self): from stock.utils import validate_warehouse_user - warehouses = list(set([d.reserved_warehouse for d in self.doclist.get({"doctype": self.tname})])) + warehouses = list(set([d.reserved_warehouse for d in + self.doclist.get({"doctype": self.tname}) if d.reserved_warehouse])) for w in warehouses: validate_warehouse_user(w)