Commit 667e3d6c authored by Sebastien Robin's avatar Sebastien Robin

move specific zsql method to erp5_mysql_innodb

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13555 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dccd1f8e
<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: isMovement</value>
</item>
<item key="_filter_type_archive" type="tuple">
</item>
</catalog_method>
\ No newline at end of file
<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: isMovement</value>
</item>
<item key="_filter_type_archive" type="tuple">
</item>
</catalog_method>
\ No newline at end of file
<catalog_method>
<item key="sql_catalog_object_list" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
<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: isMovement</value>
</item>
<item key="_filter_type_archive" type="tuple">
</item>
</catalog_method>
\ No newline at end of file
<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>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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>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_catalog</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># Host:\n
# Database: test\n
# Table: \'catalog\'\n
#\n
CREATE TABLE `catalog` (\n
`uid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,\n
`security_uid` INT UNSIGNED,\n
`path` varchar(255) NOT NULL default \'\',\n
`relative_url` varchar(255) NOT NULL default \'\',\n
`parent_uid` BIGINT UNSIGNED default \'0\',\n
`id` varchar(255) default \'\',\n
`description` text,\n
`title` varchar(255) default \'\',\n
`meta_type` varchar(255) default \'\',\n
`portal_type` varchar(255) default \'\',\n
`opportunity_state` varchar(255) default \'\',\n
`corporate_registration_code` varchar(255),\n
`ean13_code` varchar(255),\n
`validation_state` varchar(255) default \'\',\n
`validation_state_title` varchar(255) default \'\',\n
`simulation_state` varchar(255) default \'\',\n
`simulation_state_title` varchar(255) default \'\',\n
`causality_state` varchar(255) default \'\',\n
`invoice_state` varchar(255) default \'\',\n
`payment_state` varchar(255) default \'\',\n
`event_state` varchar(255) default \'\',\n
`reference` varchar(255) default \'\',\n
`grouping_reference` varchar(255) default \'\',\n
`source_reference` varchar(255) default \'\',\n
`destination_reference` varchar(255) default \'\',\n
`string_index` varchar(255),\n
`int_index` INT,\n
`float_index` real,\n
`has_cell_content` bool,\n
`creation_date` datetime,\n
`modification_date` datetime,\n
`start_date` datetime,\n
`stop_date` datetime,\n
PRIMARY KEY (`uid`),\n
KEY `security_uid` (`security_uid`),\n
KEY `Parent` (`parent_uid`),\n
KEY `Path` (`path`),\n
KEY `relative_url` (`relative_url`),\n
KEY `Type` (`meta_type`,`portal_type`),\n
KEY `Type1` (`portal_type`),\n
KEY `Type2` (`meta_type`),\n
KEY `opportunity_state` (`opportunity_state`),\n
KEY `validation_state` (`validation_state`),\n
KEY `validation_state_title` (`validation_state_title`),\n
KEY `simulation_state` (`simulation_state`),\n
KEY `simulation_state_title` (`simulation_state_title`),\n
KEY `causality_state` (`causality_state`),\n
KEY `invoice_state` (`invoice_state`),\n
KEY `payment_state` (`payment_state`),\n
KEY `event_state` (`event_state`)\n
) TYPE=InnoDB;\n
</string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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># Host:\n
# Database: test\n
# Table: \'catalog\'\n
#\n
CREATE TABLE `catalog` (\n
`uid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,\n
`security_uid` INT UNSIGNED,\n
`path` varchar(255) NOT NULL default \'\',\n
`relative_url` varchar(255) NOT NULL default \'\',\n
`parent_uid` BIGINT UNSIGNED default \'0\',\n
`id` varchar(255) default \'\',\n
`description` text,\n
`title` varchar(255) default \'\',\n
`meta_type` varchar(255) default \'\',\n
`portal_type` varchar(255) default \'\',\n
`opportunity_state` varchar(255) default \'\',\n
`corporate_registration_code` varchar(255),\n
`ean13_code` varchar(255),\n
`validation_state` varchar(255) default \'\',\n
`validation_state_title` varchar(255) default \'\',\n
`simulation_state` varchar(255) default \'\',\n
`simulation_state_title` varchar(255) default \'\',\n
`causality_state` varchar(255) default \'\',\n
`invoice_state` varchar(255) default \'\',\n
`payment_state` varchar(255) default \'\',\n
`event_state` varchar(255) default \'\',\n
`reference` varchar(255) default \'\',\n
`grouping_reference` varchar(255) default \'\',\n
`source_reference` varchar(255) default \'\',\n
`destination_reference` varchar(255) default \'\',\n
`string_index` varchar(255),\n
`int_index` INT,\n
`float_index` real,\n
`has_cell_content` bool,\n
`creation_date` datetime,\n
`modification_date` datetime,\n
`start_date` datetime,\n
`stop_date` datetime,\n
PRIMARY KEY (`uid`),\n
KEY `security_uid` (`security_uid`),\n
KEY `Parent` (`parent_uid`),\n
KEY `Path` (`path`),\n
KEY `relative_url` (`relative_url`),\n
KEY `Type` (`meta_type`,`portal_type`),\n
KEY `Type1` (`portal_type`),\n
KEY `Type2` (`meta_type`),\n
KEY `opportunity_state` (`opportunity_state`),\n
KEY `validation_state` (`validation_state`),\n
KEY `validation_state_title` (`validation_state_title`),\n
KEY `simulation_state` (`simulation_state`),\n
KEY `simulation_state_title` (`simulation_state_title`),\n
KEY `causality_state` (`causality_state`),\n
KEY `invoice_state` (`invoice_state`),\n
KEY `payment_state` (`payment_state`),\n
KEY `event_state` (`event_state`)\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>
<catalog_method>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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>table_0</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>table_1</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>table_0</string>
<string>table_1</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1</string> </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_related_default_site</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-var table_1>.uid = <dtml-var table_0>.category_uid\n
AND <dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.site.getUid()">\n
AND <dtml-var table_0>.uid = catalog.uid
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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-var table_1>.uid = <dtml-var table_0>.category_uid\n
AND <dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.site.getUid()">\n
AND <dtml-var table_0>.uid = catalog.uid
]]></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>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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>table_0</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>table_1</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>table_0</string>
<string>table_1</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1</string> </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_related_destination_payment</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-var table_0>.uid = catalog.uid\n
AND <dtml-var table_1>.uid = <dtml-var table_0>.category_uid\n
AND <dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.destination_payment.getUid()">
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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-var table_0>.uid = catalog.uid\n
AND <dtml-var table_1>.uid = <dtml-var table_0>.category_uid\n
AND <dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.destination_payment.getUid()">
]]></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>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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>table_0</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>table_0</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</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>table_0</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> <string></string> </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_related_translated_simulation_state_title</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>15</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>15</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-var table_0>.original_message = catalog.simulation_state\n
AND <dtml-var table_0>.message_context = "simulation_state_title"\n
AND <dtml-var table_0>.language = <dtml-sqlvar "Localizer.get_selected_language()" type="string">
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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-var table_0>.original_message = catalog.simulation_state\n
AND <dtml-var table_0>.message_context = "simulation_state_title"\n
AND <dtml-var table_0>.language = <dtml-sqlvar "Localizer.get_selected_language()" type="string">
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -70,22 +70,20 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from DateTime import DateTime\n
\n
user_site_list = context.Baobab_getUserAssignedSiteList()\n
if len(user_site_list)>0:\n
site = context.Baobab_getVaultSite(user_site_list[0])\n
site_url = site.getRelativeUrl()\n
context.setSite(site_url)\n
if len(user_site_list) == 0:\n
raise ValueError, "You cannot create a CounterDate if you don\'t have an assignment."\n
\n
from DateTime import DateTime\n
start_date = DateTime(DateTime().Date())\n
context.setStartDate(start_date)\n
site = context.Baobab_getVaultSite(user_site_list[0])\n
context.setSiteValue(site)\n
context.setStartDate(DateTime(DateTime().Date()))\n
\n
# Set a reference\n
site_id = context.getSiteId()\n
\n
counter_date_list = [x.getObject() for x in context.portal_catalog(\n
portal_type=\'Counter Date\',site_id=site_id,\n
so_order=[(\'start_date\',\'descending\')],limit=10,\n
portal_type=\'Counter Date\',site_id=site.getSiteId(),\n
so_order=[(\'start_date\',\'descending\')],limit=1,\n
simulation_state=(\'open\',\'closed\'))]\n
previous_reference = None\n
if len(counter_date_list)>0:\n
......@@ -147,16 +145,14 @@ context.setReference(reference)\n
<value>
<tuple>
<string>kw</string>
<string>DateTime</string>
<string>_getattr_</string>
<string>context</string>
<string>user_site_list</string>
<string>len</string>
<string>ValueError</string>
<string>_getitem_</string>
<string>site</string>
<string>site_url</string>
<string>DateTime</string>
<string>start_date</string>
<string>site_id</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
......
159
\ No newline at end of file
161
\ No newline at end of file
erp5_mysql/z_catalog_item_list
erp5_mysql/z_catalog_movement_list
erp5_mysql/z_catalog_object_list
erp5_mysql/z_catalog_stock_list
erp5_mysql/z_create_catalog
erp5_mysql/z_related_default_site
erp5_mysql/z_related_destination_payment
erp5_mysql/z_related_translated_simulation_state_title
\ No newline at end of file
erp5_mysql_innodb/z_catalog_item_list
erp5_mysql_innodb/z_catalog_movement_list
erp5_mysql_innodb/z_catalog_object_list
erp5_mysql_innodb/z_catalog_stock_list
erp5_mysql_innodb/z_create_catalog
erp5_mysql_innodb/z_related_default_site
erp5_mysql_innodb/z_related_destination_payment
erp5_mysql_innodb/z_related_translated_simulation_state_title
\ No newline at end of file
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