Commit f2032cd1 authored by Julien Muchembled's avatar Julien Muchembled

Clean XML of Z SQL Methods of most erp5_* BT

Excluded BT:
- erp5_banking_*
- erp5_bpm
- erp5_full_text_sphinxse_catalog
- erp5_mysql_ndb_catalog

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41518 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e9039a4e
......@@ -6,49 +6,6 @@
</pickle>
<pickle>
<dictionary>
<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
......@@ -75,56 +32,6 @@ AND <dtml-var table_0>.uid = catalog.uid
]]></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-var table_1>.uid = <dtml-var table_0>.category_uid\n
<dtml-if expr="portal_preferences.getPreferredAccountingTransactionGap()">\n
AND <dtml-var table_1>.relative_url LIKE <dtml-sqlvar expr="portal_preferences.getPreferredAccountingTransactionGap()+\'%\'" type="string">\n
</dtml-if>\n
AND <dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.gap.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>
......
......@@ -6,49 +6,6 @@
</pickle>
<pickle>
<dictionary>
<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
......@@ -77,58 +34,6 @@ AND <dtml-var table_0>.category_strict_membership = 1\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-var table_1>.uid = <dtml-var table_0>.category_uid\n
<dtml-if expr="portal_preferences.getPreferredAccountingTransactionGap()">\n
AND <dtml-var table_1>.relative_url LIKE <dtml-sqlvar expr="portal_preferences.getPreferredAccountingTransactionGap()+\'%\'" type="string">\n
</dtml-if>\n
AND <dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.gap.getUid()">\n
AND <dtml-var table_0>.uid = catalog.uid\n
AND <dtml-var table_0>.category_strict_membership = 1\n
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -14,73 +14,6 @@
</list>
</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>at_date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>node_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>section_uid</string> </key>
<value>
<dictionary>
<item>
<key> <string>type</string> </key>
<value> <string>list</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>simulation_state</string> </key>
<value>
<dictionary>
<item>
<key> <string>type</string> </key>
<value> <string>list</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>node_uid</string>
<string>at_date</string>
<string>section_uid</string>
<string>simulation_state</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_col</string> </key>
<value>
......@@ -219,93 +152,6 @@ ORDER BY\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 query="portal_catalog.buildSQLQuery(query=portal_catalog.getSecurityQuery())">\n
SELECT DISTINCT\n
catalog.relative_url,\n
catalog.path,\n
catalog.title,\n
catalog.portal_type,\n
catalog.validation_state\n
FROM\n
<dtml-in prefix="table" expr="query[\'from_table_list\']">\n
<dtml-if "table_key not in (\'stock\', \'catalog\')">\n
<dtml-var table_item> AS <dtml-var table_key>,\n
</dtml-if>\n
</dtml-in>\n
catalog,\n
stock\n
WHERE\n
stock.mirror_section_uid = catalog.uid\n
<dtml-if node_uid>\n
AND stock.node_uid = <dtml-sqlvar node_uid type="string">\n
</dtml-if>\n
<dtml-if at_date>\n
AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
<dtml-if simulation_state>\n
AND ( stock.simulation_state IN (<dtml-in simulation_state><dtml-sqlvar sequence-item type="string">\n
<dtml-unless sequence-end>, </dtml-unless></dtml-in>) )\n
</dtml-if>\n
\n
<dtml-if section_uid>\n
AND (\n
stock.section_uid IN ( <dtml-in section_uid><dtml-sqlvar sequence-item type="int">\n
<dtml-unless sequence-end>, </dtml-unless> </dtml-in> )\n
)\n
</dtml-if>\n
\n
AND stock.portal_type in ( <dtml-in getPortalAccountingMovementTypeList><dtml-sqlvar\n
sequence-item type="string"><dtml-unless sequence-end>, </dtml-unless></dtml-in> )\n
<dtml-if "query[\'where_expression\']">\n
AND <dtml-var "query[\'where_expression\']">\n
</dtml-if>\n
ORDER BY\n
catalog.portal_type, catalog.title\n
</dtml-let>
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -14,90 +14,6 @@
</list>
</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>at_date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>node_uid</string> </key>
<value>
<dictionary>
<item>
<key> <string>type</string> </key>
<value> <string>list</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<dictionary>
<item>
<key> <string>type</string> </key>
<value> <string>list</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>section_uid</string> </key>
<value>
<dictionary>
<item>
<key> <string>type</string> </key>
<value> <string>list</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>simulation_state</string> </key>
<value>
<dictionary>
<item>
<key> <string>type</string> </key>
<value> <string>list</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>node_uid</string>
<string>section_uid</string>
<string>simulation_state</string>
<string>portal_type</string>
<string>at_date</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......@@ -239,136 +155,6 @@ ORDER BY mirror_section_title, date
]]></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-comment>Returns all movements <= at_date which does not have a grouping\n
reference or having a grouping reference with movements where date is after the\n
at_date. \n
\n
Here, a group of movement means:\n
section_uid is from section_uid:list, or is the same if section_uid is not passed.\n
mirror_section_uid is the same\n
node_uid is the same\n
grouping_reference is the same\n
</dtml-comment>\n
\n
( SELECT catalog.path as path,\n
catalog.uid as uid,\n
mirror_section.relative_url as mirror_section_relative_url,\n
mirror_section.title as mirror_section_title,\n
stock.date as date,\n
IFNULL(stock.total_price, 0) as total_price,\n
IFNULL(stock.quantity, 0) as total_quantity\n
\n