From 0847f9a0746e9c6f5ac03064faa9ca0a0b65ca99 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 14 Jul 2015 18:23:05 +0530 Subject: [PATCH] Reserved warehouse should not be validated on cancellation of sales order --- erpnext/controllers/selling_controller.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index c709326461..b2a9f0317f 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -171,9 +171,6 @@ class SellingController(StockController): frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx)) if self.doctype == "Sales Order": - if (frappe.db.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or - self.has_product_bundle(d.item_code)) and not d.warehouse: - frappe.throw(_("Reserved Warehouse required for stock Item {0} in row {1}").format(d.item_code, d.idx)) reserved_warehouse = d.warehouse if flt(d.qty) > flt(d.delivered_qty): reserved_qty_for_main_item = flt(d.qty) - flt(d.delivered_qty)