From 0b9da636fbb8c10c897d419c87d71eb905de3e97 Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Tue, 7 Jun 2011 18:20:14 +0900
Subject: [PATCH] Stop displaying non-dated production order in planning box.
 It is useless.

---
 .../ProductionOrderModule_getSelectionProductionOrderList.xml | 4 +++-
 bt5/erp5_mrp/bt/change_log                                    | 3 +++
 bt5/erp5_mrp/bt/revision                                      | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_getSelectionProductionOrderList.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_getSelectionProductionOrderList.xml
index 32e5fc47d3..a5fb89b2fb 100644
--- a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_getSelectionProductionOrderList.xml
+++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_getSelectionProductionOrderList.xml
@@ -50,8 +50,10 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>return context.portal_selections.getSelectionValueList(context=context,\n
+            <value> <string>return [brain\n
+        for brain in context.portal_selections.getSelectionValueList(context=context,\n
                                                 selection_name= \'production_order_module_selection\')\n
+        if brain.getStartDate() is not None and brain.getStopDate() is not None]\n
 </string> </value>
         </item>
         <item>
diff --git a/bt5/erp5_mrp/bt/change_log b/bt5/erp5_mrp/bt/change_log
index 20665dde85..cdc0fa1f87 100644
--- a/bt5/erp5_mrp/bt/change_log
+++ b/bt5/erp5_mrp/bt/change_log
@@ -1,3 +1,6 @@
+2011-06-07 yusei
+* Stop displaying non-dated production order in planning box. It is useless.
+
 2011-06-02 arnaud.fontaine
 * Fix quantity unit conversion on ProductionOrder_viewMaterialConsumption.
 
diff --git a/bt5/erp5_mrp/bt/revision b/bt5/erp5_mrp/bt/revision
index 4754f24761..a8114de9cf 100644
--- a/bt5/erp5_mrp/bt/revision
+++ b/bt5/erp5_mrp/bt/revision
@@ -1 +1 @@
-461
\ No newline at end of file
+462
\ No newline at end of file
-- 
2.30.9