Commit e0472bfb authored by Jérome Perrin's avatar Jérome Perrin

we no longuer use custom SQL methods for Entity's transaction view.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10556 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b46cdd99
<?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>_Use_Database_Methods_Permission</string> </key>
<value>
<list>
<string>Member</string>
</list>
</value>
</item>
<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>at_date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>from_date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getUid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>hide_grouping</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
</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>omit_input</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>omit_output</string> </key>
<value>
<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>query</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>resource_uid</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>section_category</string> </key>
<value>
<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>
<item>
<key> <string>stat</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>to_date</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>getUid</string>
<string>query</string>
<string>omit_input</string>
<string>omit_output</string>
<string>resource_uid</string>
<string>from_date</string>
<string>at_date</string>
<string>to_date</string>
<string>simulation_state</string>
<string>section_category</string>
<string>portal_type</string>
<string>node_uid</string>
<string>hide_grouping</string>
<string>resource_uid</string>
<string>stat</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</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>getUid\r\n
query\r\n
omit_input\r\n
omit_output\r\n
resource_uid:list\r\n
from_date\r\n
at_date\r\n
to_date\r\n
simulation_state:list\r\n
section_category\r\n
portal_type:list\r\n
node_uid:list\r\n
hide_grouping=""\r\n
resource_uid=""\r\n
stat</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>zsqlbrain.py</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</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>Entity_zGetAccountingTransactionList</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>0</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-if getUid>\n
SELECT\n
<dtml-if stat>\n
IFNULL(SUM(stock.total_price), 0.00) AS total_price,\n
IFNULL(SUM(stock.quantity), 0.00) AS quantity\n
<dtml-else>\n
DISTINCT child.uid AS uid\n
, child.path AS path\n
, stock.date AS date\n
, stock.node_uid AS account_uid\n
, catalog.reference AS parent_reference\n
, mirror_section.title AS section_title\n
, IF(stock.section_uid = delivery.source_section_uid,\n
catalog.source_reference,\n
catalog.destination_reference) AS parent_specific_reference\n
, catalog.portal_type AS portal_type\n
<dtml-if resource_uid>\n
, IFNULL(SUM(IF(stock.quantity > 0,\n
stock.quantity, 0)), 0.00) AS debit\n
, IFNULL(SUM(IF(stock.quantity < 0,\n
- stock.quantity, 0)), 0.00) AS credit\n
, IFNULL(SUM(stock.quantity), 0.00) AS balance\n
<dtml-else>\n
, IFNULL(SUM(IF(stock.total_price > 0,\n
stock.total_price, 0)), 0.00) AS debit\n
, IFNULL(SUM(IF(stock.total_price < 0,\n
- stock.total_price, 0)), 0.00) AS credit\n
, IFNULL(SUM(stock.total_price), 0.00) AS balance\n
</dtml-if>\n
</dtml-if>\n
FROM\n
stock\n
, catalog AS child\n
, catalog\n
, catalog AS node\n
, category AS node_category\n
, category AS section_category\n
, catalog AS mirror_section\n
, delivery\n
<dtml-if query>\n
, category\n
</dtml-if>\n
WHERE stock.mirror_section_uid = <dtml-var getUid>\n
AND child.uid = stock.uid\n
AND delivery.uid = catalog.uid\n
AND child.parent_uid = catalog.uid\n
AND child.portal_type <> "Simulation Movement"\n
AND node.uid = stock.node_uid\n
AND node.uid = node_category.uid\n
AND stock.section_uid = section_category.uid\n
AND section_category.uid = mirror_section.uid\n
AND (node_category.category_uid = <dtml-var\n
expr="getPortalObject().portal_categories.account_type.asset.receivable.getUid()">\n
OR node_category.category_uid = <dtml-var\n
expr="getPortalObject().portal_categories.account_type.liability.payable.getUid()">\n
)\n
AND node_category.category_strict_membership = 1\n
<dtml-if portal_type>\n
AND (\n
<dtml-in portal_type>\n
catalog.portal_type = <dtml-sqlvar sequence-item type="string">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
\n
<dtml-if node_uid>\n
AND (\n
<dtml-in node_uid>\n
stock.node_uid = <dtml-sqlvar sequence-item type="int">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if resource_uid>\n
AND (\n
<dtml-in resource_uid>\n
stock.resource_uid = <dtml-sqlvar sequence-item type="int">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if from_date>\n
AND stock.date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND stock.date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n
<dtml-if omit_input>\n
AND stock.total_price > 0\n
</dtml-if>\n
<dtml-if omit_output>\n
AND stock.total_price < 0\n
</dtml-if>\n
AND stock.total_price != 0\n
<dtml-if simulation_state>\n
AND (\n
<dtml-in simulation_state>\n
catalog.simulation_state = <dtml-sqlvar sequence-item type="string">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if section_category>\n
AND section_category.category_uid =\n
<dtml-var expr="portal_categories.resolveCategory(section_category).getUid()">\n
<dtml-else>\n
AND section_category.category_strict_membership = 1\n
</dtml-if>\n
<dtml-if hide_grouping>\n
AND (child.grouping_reference IS NULL or child.grouping_reference = "")\n
</dtml-if hide_grouping>\n
<dtml-if query>\n
AND category.uid = stock.section_uid\n
AND <dtml-var query>\n
</dtml-if>\n
<dtml-unless stat>\n
GROUP BY catalog.uid, stock.node_uid\n
</dtml-unless>\n
ORDER BY stock.date, child.uid\n
</dtml-if>
]]></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-if getUid>\n
SELECT\n
<dtml-if stat>\n
IFNULL(SUM(stock.total_price), 0.00) AS total_price,\n
IFNULL(SUM(stock.quantity), 0.00) AS quantity\n
<dtml-else>\n
DISTINCT child.uid AS uid\n
, child.path AS path\n
, stock.date AS date\n
, stock.node_uid AS account_uid\n
, catalog.reference AS parent_reference\n
, mirror_section.title AS section_title\n
, IF(stock.section_uid = delivery.source_section_uid,\n
catalog.source_reference,\n
catalog.destination_reference) AS parent_specific_reference\n
, catalog.portal_type AS portal_type\n
<dtml-if resource_uid>\n
, IFNULL(SUM(IF(stock.quantity > 0,\n
stock.quantity, 0)), 0.00) AS debit\n
, IFNULL(SUM(IF(stock.quantity < 0,\n
- stock.quantity, 0)), 0.00) AS credit\n
, IFNULL(SUM(stock.quantity), 0.00) AS balance\n
<dtml-else>\n
, IFNULL(SUM(IF(stock.total_price > 0,\n
stock.total_price, 0)), 0.00) AS debit\n
, IFNULL(SUM(IF(stock.total_price < 0,\n
- stock.total_price, 0)), 0.00) AS credit\n
, IFNULL(SUM(stock.total_price), 0.00) AS balance\n
</dtml-if>\n
</dtml-if>\n
FROM\n
stock\n
, catalog AS child\n
, catalog\n
, catalog AS node\n
, category AS node_category\n
, category AS section_category\n
, catalog AS mirror_section\n
, delivery\n
<dtml-if query>\n
, category\n
</dtml-if>\n
WHERE stock.mirror_section_uid = <dtml-var getUid>\n
AND child.uid = stock.uid\n
AND delivery.uid = catalog.uid\n
AND child.parent_uid = catalog.uid\n
AND child.portal_type <> "Simulation Movement"\n
AND node.uid = stock.node_uid\n
AND node.uid = node_category.uid\n
AND stock.section_uid = section_category.uid\n
AND section_category.uid = mirror_section.uid\n
AND (node_category.category_uid = <dtml-var\n
expr="getPortalObject().portal_categories.account_type.asset.receivable.getUid()">\n
OR node_category.category_uid = <dtml-var\n
expr="getPortalObject().portal_categories.account_type.liability.payable.getUid()">\n
)\n
AND node_category.category_strict_membership = 1\n
<dtml-if portal_type>\n
AND (\n
<dtml-in portal_type>\n
catalog.portal_type = <dtml-sqlvar sequence-item type="string">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
\n
<dtml-if node_uid>\n
AND (\n
<dtml-in node_uid>\n
stock.node_uid = <dtml-sqlvar sequence-item type="int">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if resource_uid>\n
AND (\n
<dtml-in resource_uid>\n
stock.resource_uid = <dtml-sqlvar sequence-item type="int">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if from_date>\n
AND stock.date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND stock.date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n
<dtml-if omit_input>\n
AND stock.total_price > 0\n
</dtml-if>\n
<dtml-if omit_output>\n
AND stock.total_price < 0\n
</dtml-if>\n
AND stock.total_price != 0\n
<dtml-if simulation_state>\n
AND (\n
<dtml-in simulation_state>\n
catalog.simulation_state = <dtml-sqlvar sequence-item type="string">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if section_category>\n
AND section_category.category_uid =\n
<dtml-var expr="portal_categories.resolveCategory(section_category).getUid()">\n
<dtml-else>\n
AND section_category.category_strict_membership = 1\n
</dtml-if>\n
<dtml-if hide_grouping>\n
AND (child.grouping_reference IS NULL or child.grouping_reference = "")\n
</dtml-if hide_grouping>\n
<dtml-if query>\n
AND category.uid = stock.section_uid\n
AND <dtml-var query>\n
</dtml-if>\n
<dtml-unless stat>\n
GROUP BY catalog.uid, stock.node_uid\n
</dtml-unless>\n
ORDER BY stock.date, child.uid\n
</dtml-if>
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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