From 41380dfad80094ad19e8b2f342542790f9825d0c Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 16 Mar 2016 15:26:01 +0530 Subject: [PATCH] Fixed Production Planning Tool --- .../production_planning_tool/production_planning_tool.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py index ea7e660dd5..b79b136f8c 100644 --- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py +++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py @@ -135,8 +135,7 @@ class ProductionPlanningTool(Document): from `tabSales Order Item` so_item where parent in (%s) and docstatus = 1 and qty > delivered_qty and exists (select * from `tabItem` item where item.name=so_item.item_code - and (item.is_pro_applicable = 1 - or item.is_sub_contracted_item = 1)) %s""" % \ + and item.is_pro_applicable = 1) %s""" % \ (", ".join(["%s"] * len(so_list)), item_condition), tuple(so_list), as_dict=1) if self.fg_item: @@ -150,8 +149,7 @@ class ProductionPlanningTool(Document): and pi.parent_item = so_item.item_code and so_item.parent in (%s) and so_item.qty > so_item.delivered_qty and exists (select * from `tabItem` item where item.name=pi.item_code - and (item.is_pro_applicable = 1 - or item.is_sub_contracted_item = 1)) %s""" % \ + and item.is_pro_applicable = 1) %s""" % \ (", ".join(["%s"] * len(so_list)), item_condition), tuple(so_list), as_dict=1) self.add_items(items + packed_items) @@ -171,8 +169,7 @@ class ProductionPlanningTool(Document): from `tabMaterial Request Item` mr_item where parent in (%s) and docstatus = 1 and qty > ordered_qty and exists (select * from `tabItem` item where item.name=mr_item.item_code - and (item.is_pro_applicable = 1 - or item.is_sub_contracted_item = 1)) %s""" % \ + and item.is_pro_applicable = 1) %s""" % \ (", ".join(["%s"] * len(mr_list)), item_condition), tuple(mr_list), as_dict=1) self.add_items(items)