Commit 046bd8ca authored by Aurel's avatar Aurel

* customize delivery table to search on specific information

* one script were not commited in previous commit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14680 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 967024b2
<catalog_method>
<item key="sql_catalog_object_list" type="int">
<value>1</value>
</item>
<item key="_is_filtered_archive" type="int">
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: isDelivery</value>
</item>
<item key="_filter_type_archive" type="tuple">
</item>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_arg</string> </key>
<value>
<object>
<klass>
<global name="Args" module="Shared.DC.ZRDB.Aqueduct"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_data</string> </key>
<value>
<dictionary>
<item>
<key> <string>getDestinationPaymentInternalBankAccountNumber</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getDestinationPaymentReference</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getDestinationSectionUid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getDestinationUid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getResourceUid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getSourcePaymentInternalBankAccountNumber</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getSourcePaymentReference</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getSourceSectionUid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getSourceTotalAssetPrice</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getSourceUid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getStartDateRangeMax</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getStartDateRangeMin</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getStopDateRangeMax</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getStopDateRangeMin</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>isDelivery</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>isDelivery</string>
<string>uid</string>
<string>getSourceUid</string>
<string>getDestinationUid</string>
<string>getSourceSectionUid</string>
<string>getDestinationSectionUid</string>
<string>getResourceUid</string>
<string>getStartDateRangeMin</string>
<string>getStartDateRangeMax</string>
<string>getStopDateRangeMin</string>
<string>getStopDateRangeMax</string>
<string>getSourcePaymentReference</string>
<string>getDestinationPaymentReference</string>
<string>getSourcePaymentInternalBankAccountNumber</string>
<string>getDestinationPaymentInternalBankAccountNumber</string>
<string>getSourceTotalAssetPrice</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>isDelivery\r\n
uid\r\n
getSourceUid\r\n
getDestinationUid\r\n
getSourceSectionUid\r\n
getDestinationSectionUid\r\n
getResourceUid\r\n
getStartDateRangeMin\r\n
getStartDateRangeMax\r\n
getStopDateRangeMin\r\n
getStopDateRangeMax\r\n
getSourcePaymentReference\r\n
getDestinationPaymentReference\r\n
getSourcePaymentInternalBankAccountNumber\r\n
getDestinationPaymentInternalBankAccountNumber\r\n
getSourceTotalAssetPrice</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_catalog_delivery_list</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-let delivery_list="[]">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if "isDelivery[loop_item]">\n
<dtml-call expr="delivery_list.append(loop_item)">\n
</dtml-if>\n
</dtml-in>\n
<dtml-if expr="_.len(delivery_list) > 0">\n
REPLACE INTO\n
delivery\n
VALUES\n
<dtml-in prefix="loop" expr="delivery_list">\n
( \n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
<dtml-sqlvar expr="getSourceUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getDestinationUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getSourceSectionUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getDestinationSectionUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getResourceUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getStartDateRangeMin[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStartDateRangeMax[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStopDateRangeMin[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStopDateRangeMax[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getSourcePaymentReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getDestinationPaymentReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSourcePaymentInternalBankAccountNumber[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getDestinationPaymentInternalBankAccountNumber[loop_item]" type="string" optional>\n
<dtml-sqlvar expr="getSourceTotalAssetPrice[loop_item]" type="string" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>\n
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="__newobj__" module="copy_reg"/>
</klass>
<tuple>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string encoding="cdata"><![CDATA[
<string>
]]></string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-let delivery_list="[]">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if "isDelivery[loop_item]">\n
<dtml-call expr="delivery_list.append(loop_item)">\n
</dtml-if>\n
</dtml-in>\n
<dtml-if expr="_.len(delivery_list) > 0">\n
REPLACE INTO\n
delivery\n
VALUES\n
<dtml-in prefix="loop" expr="delivery_list">\n
( \n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
<dtml-sqlvar expr="getSourceUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getDestinationUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getSourceSectionUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getDestinationSectionUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getResourceUid[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getStartDateRangeMin[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStartDateRangeMax[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStopDateRangeMin[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStopDateRangeMax[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getSourcePaymentReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getDestinationPaymentReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSourcePaymentInternalBankAccountNumber[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getDestinationPaymentInternalBankAccountNumber[loop_item]" type="string" optional>\n
<dtml-sqlvar expr="getSourceTotalAssetPrice[loop_item]" type="string" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>\n
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_clear_catalog" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_arg</string> </key>
<value>
<object>
<klass>
<global name="Args" module="Shared.DC.ZRDB.Aqueduct"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_data</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_col</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_create_delivery</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string>CREATE TABLE `delivery` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`source_uid` BIGINT UNSIGNED default \'0\',\n
`destination_uid` BIGINT UNSIGNED default \'0\',\n
`source_section_uid` BIGINT UNSIGNED default \'0\',\n
`destination_section_uid` BIGINT UNSIGNED default \'0\',\n
`resource_uid` BIGINT UNSIGNED default \'0\',\n
`start_date_range_min` datetime default NULL,\n
`start_date_range_max` datetime default NULL,\n
`stop_date_range_min` datetime default NULL,\n
`stop_date_range_max` datetime default NULL,\n
`source_payment_reference` varchar(255) default \'\',\n
`destination_payment_reference` varchar(255) default \'\',\n
`source_payment_internal_bank_account_number` varchar(255) default \'\',\n
`destination_payment_internal_bank_account_number` varchar(255) default \'\',\n
`source_total_asset_price` real default \'0\',\n
PRIMARY KEY (`uid`),\n
KEY `source_uid` (`source_uid`),\n
KEY `destination_uid` (`destination_uid`),\n
KEY `source_section_uid` (`source_section_uid`),\n
KEY `destination_section_uid` (`destination_section_uid`),\n
KEY `resource_uid` (`resource_uid`),\n
KEY `source_reference` (`source_payment_reference`),\n
KEY `destination_payment_reference` (`destination_payment_reference`)\n
) TYPE=InnoDB\n
</string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="__newobj__" module="copy_reg"/>
</klass>
<tuple>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string encoding="cdata"><![CDATA[
<string>
]]></string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string>CREATE TABLE `delivery` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`source_uid` BIGINT UNSIGNED default \'0\',\n
`destination_uid` BIGINT UNSIGNED default \'0\',\n
`source_section_uid` BIGINT UNSIGNED default \'0\',\n
`destination_section_uid` BIGINT UNSIGNED default \'0\',\n
`resource_uid` BIGINT UNSIGNED default \'0\',\n
`start_date_range_min` datetime default NULL,\n
`start_date_range_max` datetime default NULL,\n
`stop_date_range_min` datetime default NULL,\n
`stop_date_range_max` datetime default NULL,\n
`source_payment_reference` varchar(255) default \'\',\n
`destination_payment_reference` varchar(255) default \'\',\n
`source_payment_internal_bank_account_number` varchar(255) default \'\',\n
`destination_payment_internal_bank_account_number` varchar(255) default \'\',\n
`source_total_asset_price` real default \'0\',\n
PRIMARY KEY (`uid`),\n
KEY `source_uid` (`source_uid`),\n
KEY `destination_uid` (`destination_uid`),\n
KEY `source_section_uid` (`source_section_uid`),\n
KEY `destination_section_uid` (`destination_section_uid`),\n
KEY `resource_uid` (`resource_uid`),\n
KEY `source_reference` (`source_payment_reference`),\n
KEY `destination_payment_reference` (`destination_payment_reference`)\n
) TYPE=InnoDB\n
</string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># this script compare a given vault to the one of the assignment of the current user\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n
\n
site_list = context.Baobab_getUserAssignedSiteList()\n
if vault not in site_list:\n
msg = Message(domain = "ui", message="Vault differ between initialisation and transition")\n
raise ValidationFailed, (msg,)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>vault</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>vault</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>_getattr_</string>
<string>context</string>
<string>site_list</string>
<string>msg</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Baobab_checkSameUserVault</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
250 253
\ No newline at end of file \ No newline at end of file
erp5_mysql_innodb/z_catalog_delivery_list
erp5_mysql_innodb/z_catalog_item_list erp5_mysql_innodb/z_catalog_item_list
erp5_mysql_innodb/z_catalog_movement_list erp5_mysql_innodb/z_catalog_movement_list
erp5_mysql_innodb/z_catalog_object_list erp5_mysql_innodb/z_catalog_object_list
erp5_mysql_innodb/z_catalog_stock_list erp5_mysql_innodb/z_catalog_stock_list
erp5_mysql_innodb/z_create_catalog erp5_mysql_innodb/z_create_catalog
erp5_mysql_innodb/z_create_category erp5_mysql_innodb/z_create_category
erp5_mysql_innodb/z_create_delivery
erp5_mysql_innodb/z_create_roles_and_users erp5_mysql_innodb/z_create_roles_and_users
erp5_mysql_innodb/z_create_stock erp5_mysql_innodb/z_create_stock
erp5_mysql_innodb/z_related_default_site erp5_mysql_innodb/z_related_default_site
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment