From b3d26c08f609f22ca197fd815ccfe0f0f9749b24 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 27 Jan 2014 14:58:55 +0530 Subject: [PATCH] Fixed planned qty bug and patch to recalculate planned qty --- patches/patch_list.py | 1 + stock/doctype/stock_entry/stock_entry.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patches/patch_list.py b/patches/patch_list.py index d87d3ad36f..30617205c8 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -268,4 +268,5 @@ patch_list = [ "patches.1401.update_billing_status_for_zero_value_order", "patches.1401.enable_all_price_list", "patches.1401.fix_serial_no_status_and_warehouse", + "patches.1401.fix_planned_qty", ] \ No newline at end of file diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py index 7dec8785c4..c322a1ac45 100644 --- a/stock/doctype/stock_entry/stock_entry.py +++ b/stock/doctype/stock_entry/stock_entry.py @@ -346,7 +346,8 @@ class DocType(StockController): pro_bean = webnotes.bean("Production Order", self.doc.production_order) _validate_production_order(pro_bean) self.update_produced_qty(pro_bean) - self.update_planned_qty(pro_bean) + if self.doc.purpose == "Manufacture/Repack": + self.update_planned_qty(pro_bean) def update_produced_qty(self, pro_bean): if self.doc.purpose == "Manufacture/Repack":