From 0e5d509392770f5a0d6d9330cf4832d1ac080a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Tue, 23 May 2006 16:06:02 +0000 Subject: [PATCH] 2006-05-23 aurel * add simulation_state column in item and fix Resource_zGetTrackingList git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7462 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_mysql/z_catalog_item_list.xml | 30 ++++++++++----- .../erp5_mysql/z_create_item.xml | 2 + .../erp5_core/Resource_zGetTrackingList.xml | 37 ++++++++++++++++++- 3 files changed, 58 insertions(+), 11 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_core/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/z_catalog_item_list.xml b/product/ERP5/bootstrap/erp5_core/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/z_catalog_item_list.xml index 308a0b667d..87c8954e92 100644 --- a/product/ERP5/bootstrap/erp5_core/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/z_catalog_item_list.xml +++ b/product/ERP5/bootstrap/erp5_core/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/z_catalog_item_list.xml @@ -56,6 +56,12 @@ <dictionary/> </value> </item> + <item> + <key> <string>getSimulationState</string> </key> + <value> + <dictionary/> + </value> + </item> <item> <key> <string>getStopDate</string> </key> <value> @@ -101,6 +107,7 @@ <string>getDestinationSectionUid</string> <string>getResourceUid</string> <string>getVariationText</string> +<string>getSimulationState</string> <string>getAggregateUidList</string> </list> </value> @@ -118,14 +125,15 @@ </item> <item> <key> <string>arguments_src</string> </key> - <value> <string>isMovement\n -isAccountable\n -uid\n -getStopDate\n -getDestinationUid\n -getDestinationSectionUid\n -getResourceUid\n -getVariationText\n + <value> <string>isMovement\r\n +isAccountable\r\n +uid\r\n +getStopDate\r\n +getDestinationUid\r\n +getDestinationSectionUid\r\n +getResourceUid\r\n +getVariationText\r\n +getSimulationState\r\n getAggregateUidList</string> </value> </item> <item> @@ -195,7 +203,8 @@ VALUES\n <dtml-sqlvar expr="getDestinationSectionUid[loop_item]" type="int" optional>,\n <dtml-sqlvar expr="getResourceUid[loop_item]" type="int" optional>,\n <dtml-sqlvar sequence-item type="int" optional>,\n - <dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>\n + <dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>,\n + <dtml-sqlvar expr="getSimulationState[loop_item]" type="string" optional>\n )\n <dtml-if sequence-end><dtml-else>,</dtml-if>\n </dtml-in>\n @@ -271,7 +280,8 @@ VALUES\n <dtml-sqlvar expr="getDestinationSectionUid[loop_item]" type="int" optional>,\n <dtml-sqlvar expr="getResourceUid[loop_item]" type="int" optional>,\n <dtml-sqlvar sequence-item type="int" optional>,\n - <dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>\n + <dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>,\n + <dtml-sqlvar expr="getSimulationState[loop_item]" type="string" optional>\n )\n <dtml-if sequence-end><dtml-else>,</dtml-if>\n </dtml-in>\n diff --git a/product/ERP5/bootstrap/erp5_core/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/z_create_item.xml b/product/ERP5/bootstrap/erp5_core/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/z_create_item.xml index e36b258c40..d03c744d77 100644 --- a/product/ERP5/bootstrap/erp5_core/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/z_create_item.xml +++ b/product/ERP5/bootstrap/erp5_core/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/z_create_item.xml @@ -103,6 +103,7 @@ CREATE TABLE `item` (\n `resource_uid` BIGINT UNSIGNED default \'0\',\n `aggregate_uid` BIGINT UNSIGNED default \'0\',\n `variation_text` VARCHAR(255),\n + `simulation_state` VARCHAR(255) default \'\',\n KEY `uid` (`uid`),\n KEY `node_uid` (`node_uid`),\n KEY `section_uid` (`section_uid`),\n @@ -156,6 +157,7 @@ CREATE TABLE `item` (\n `resource_uid` BIGINT UNSIGNED default \'0\',\n `aggregate_uid` BIGINT UNSIGNED default \'0\',\n `variation_text` VARCHAR(255),\n + `simulation_state` VARCHAR(255) default \'\',\n KEY `uid` (`uid`),\n KEY `node_uid` (`node_uid`),\n KEY `section_uid` (`section_uid`),\n diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml index fc24d83b1c..c775477c5b 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml @@ -111,6 +111,17 @@ <dictionary/> </value> </item> + <item> + <key> <string>simulation_state_list</string> </key> + <value> + <dictionary> + <item> + <key> <string>type</string> </key> + <value> <string>list</string> </value> + </item> + </dictionary> + </value> + </item> <item> <key> <string>to_date</string> </key> <value> @@ -143,6 +154,7 @@ <string>group_by_expression</string> <string>join_on_item</string> <string>date_condition_in_join</string> +<string>simulation_state_list</string> </list> </value> </item> @@ -340,7 +352,8 @@ selection_report\r\n order_by_expression\r\n group_by_expression\r\n join_on_item\r\n -date_condition_in_join</string> </value> +date_condition_in_join\r\n +simulation_state_list:list</string> </value> </item> <item> <key> <string>cache_time_</string> </key> @@ -414,6 +427,17 @@ FROM\n <dtml-else>\n next_item.date > item.date\n </dtml-if>\n + <dtml-if simulation_state_list>\n + AND (\n + <dtml-in simulation_state_list>\n + next_item.simulation_state = <dtml-sqlvar sequence-item type="string"> \n + <dtml-if sequence-end>\n + <dtml-else>\n + OR \n + </dtml-if>\n + </dtml-in>\n + )\n + </dtml-if>\n )\n </dtml-if>\n \n @@ -522,6 +546,17 @@ FROM\n <dtml-else>\n next_item.date > item.date\n </dtml-if>\n + <dtml-if simulation_state_list>\n + AND (\n + <dtml-in simulation_state_list>\n + next_item.simulation_state = <dtml-sqlvar sequence-item type="string"> \n + <dtml-if sequence-end>\n + <dtml-else>\n + OR \n + </dtml-if>\n + </dtml-in>\n + )\n + </dtml-if>\n )\n </dtml-if>\n \n -- 2.30.9