From 7451c63369533b8ea93c25bb7369cecd55da1ead Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Fri, 21 Sep 2007 12:31:59 +0000
Subject: [PATCH] sometime, only site is defined on document, so also retrieve
 these operations when listing remaining one add new simulation state to be
 taken into account for remaining operations

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16535 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_banking_core/Baobab_getRemainingOperationList.xml | 7 ++++++-
 .../CounterDate_getRemainingOperationList.xml              | 2 +-
 bt5/erp5_banking_core/bt/revision                          | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getRemainingOperationList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getRemainingOperationList.xml
index 58fd8ee380..4bde2d03f9 100644
--- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getRemainingOperationList.xml
+++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getRemainingOperationList.xml
@@ -71,15 +71,19 @@ if simulation_state is None:\n
   simulation_state = [\'confirmed\']\n
 kwd_source = {\'default_source_uid\' : site_uid,\'simulation_state\' : simulation_state}\n
 kwd_destination = {\'default_destination_uid\' : site_uid,\'simulation_state\' : simulation_state}\n
+kwd_site = {\'default_site_uid\' : site_uid,\'simulation_state\' : simulation_state}\n
 if date is not None:\n
   kwd_source[\'delivery.start_date\']=date\n
   kwd_destination[\'delivery.start_date\']=date\n
+  kwd_site[\'delivery.start_date\']=date\n
 if portal_type is not None:\n
   kwd_source[\'portal_type\'] = portal_type\n
   kwd_destination[\'portal_type\'] = portal_type\n
+  kwd_site[\'portal_type\'] = portal_type\n
 # as destination\n
 operation_list = list(context.portal_catalog(**kwd_source)) + \\\n
-                      list(context.portal_catalog(**kwd_destination))\n
+                 list(context.portal_catalog(**kwd_destination)) + \\\n
+                      list(context.portal_catalog(**kwd_site))\n
 operation_list_object = [x.getObject() for x in operation_list]\n
 \n
 return operation_list_object\n
@@ -138,6 +142,7 @@ return operation_list_object\n
                             <string>None</string>
                             <string>kwd_source</string>
                             <string>kwd_destination</string>
+                            <string>kwd_site</string>
                             <string>_write_</string>
                             <string>list</string>
                             <string>_apply_</string>
diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml
index 3bfe5fa3aa..d66dffd50d 100644
--- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml
+++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml
@@ -72,7 +72,7 @@ site_url = site.getRelativeUrl()\n
 operation_list = []\n
 exception_portal_type_list = [\'Paper Money Deposit\']\n
 if site_uid is not None:\n
-  not_closed_state_list = (\'ordered\',\'planned\',\'confirmed\',\'started\',\'stopped\')\n
+  not_closed_state_list = (\'ordered\',\'planned\',\'confirmed\',\'started\',\'stopped\', \'ready\', \'deposited\', \'received\')\n
   portal_type_list = [x for x in context.getPortalDeliveryTypeList()\n
                       if x not in exception_portal_type_list]\n
   document_list = context.Baobab_getRemainingOperationList(\n
diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision
index 2a9c18ad50..b0e9f8d0ff 100644
--- a/bt5/erp5_banking_core/bt/revision
+++ b/bt5/erp5_banking_core/bt/revision
@@ -1 +1 @@
-357
\ No newline at end of file
+358
\ No newline at end of file
-- 
2.30.9