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

use getInventoryStat; FIXME: buildSQLQuery is disabled, because it doesn't use the good table.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4792 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ef936a56
......@@ -69,36 +69,35 @@
<value> <string>LOG=lambda message: context.log("AccountModule_getAccountingTransactionCount", message)\n
\n
params = selection.getParams()\n
kwd = dict(params)\n
kwd = {} \n
\n
# read settings from user preference\n
preference = context.getPortalObject().portal_preferences\n
from_date = preference.getPreferredAccountingTransactionFromDate()\n
from_date = params.get(\'from_date\', preference.getPreferredAccountingTransactionFromDate())\n
if from_date :\n
kwd[\'from_date\'] = from_date\n
at_date = preference.getPreferredAccountingTransactionAtDate()\n
at_date = params.get(\'at_date\', preference.getPreferredAccountingTransactionAtDate())\n
if at_date :\n
kwd[\'at_date\'] = at_date\n
section_category = preference.getPreferredAccountingTransactionSectionCategory()\n
section_category = params.get(\'section_category\', preference.getPreferredAccountingTransactionSectionCategory())\n
if section_category :\n
kwd[\'section_category\'] = section_category\n
\n
query = context.portal_catalog.buildSQLQuery(**kwd)\n
\n
simulation_state = preference.getPreferredAccountingTransactionSimulationStateList()\n
simulation_state = params.get(\'simulation_state\', preference.getPreferredAccountingTransactionSimulationStateList())\n
if simulation_state :\n
kwd[\'simulation_state\'] = simulation_state\n
\n
if query.get(\'where_expression\'):\n
kwd[\'where_expression\'] = query[\'where_expression\']\n
if query.get(\'from_table_list\'):\n
kwd[\'from_table_list\'] = query[\'from_table_list\']\n
\n
resource = params.get(\'accounting_transaction_line_currency\')\n
if resource:\n
currency = context.portal_categories.resolveCategory(resource)\n
kwd[\'resource_uid\'] = [currency.getUid()]\n
\n
query = {} #context.portal_catalog.buildSQLQuery(query_table=\'node\', **kwd)\n
if query.get(\'where_expression\'):\n
kwd[\'where_expression\'] = query[\'where_expression\']\n
if query.get(\'from_table_list\'):\n
kwd[\'from_table_list\'] = query[\'from_table_list\']\n
\n
if kw.get(\'stat\') :\n
if selection.getDomain() :\n
kwd[\'selection_domain\'] = selection.getDomain()\n
......@@ -109,63 +108,63 @@ if kw.get(\'stat\') :\n
if selection.isInvertMode() :\n
kwd[\'selection_uids\'] = selection.getInvertModeUidList()\n
return context.portal_simulation.getInventoryStat(omit_simulation=1,\n
**kwd)\n
**kwd)\n
\n
return context.portal_simulation.getInventory(node_uid=context.getUid(),\n
return context.portal_simulation.getInventoryStat(node_uid=context.getUid(),\n
omit_simulation=1,\n
**kwd)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAgAAABQAAAArAAAASwAA
AHMgAwAAZAEAhAAAfQMAdAEAfAAAZAIAgwIAgwAAfQUAdAQAfAUAgwEAfQcAdAEAdAEAdAYAZAMA
gwIAgwAAZAQAgwIAfQkAdAEAfAkAZAUAgwIAgwAAfQoAfAoAbxQAAXwKAHQJAHwHAIMBAGQGADxu
AQABdAEAfAkAZAcAgwIAgwAAfQwAfAwAbxQAAXwMAHQJAHwHAIMBAGQIADxuAQABdAEAfAkAZAkA
gwIAgwAAfQ0AfA0AbxQAAXwNAHQJAHwHAIMBAGQKADxuAQABdAwAdAEAdAEAdAYAZAsAgwIAZAwA
gwIAfAcAjQEAfQ8AdAEAfAkAZA0AgwIAgwAAfRAAfBAAbxQAAXwQAHQJAHwHAIMBAGQOADxuAQAB
dAEAfA8AZA8AgwIAZBAAgwEAbx0AAXQPAHwPAGQQAIMCAHQJAHwHAIMBAGQQADxuAQABdAEAfA8A
ZA8AgwIAZBEAgwEAbx0AAXQPAHwPAGQRAIMCAHQJAHwHAIMBAGQRADxuAQABdAEAfAUAZA8AgwIA
ZBIAgwEAfRIAfBIAb0EAAXQBAHQBAHQGAGQTAIMCAGQUAIMCAHwSAIMBAH0TAHQBAHwTAGQVAIMC
AIMAAGcBAHQJAHwHAIMBAGQWADxuAQABdAEAfAI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B
EwEgARABIAEeAQsCMAIoAQAAAHMrAAAAQWNjb3VudE1vZHVsZV9nZXRBY2NvdW50aW5nVHJhbnNh
Y3Rpb25Db3VudCgBAAAAcysAAABBY2NvdW50TW9kdWxlX2dldEFjY291bnRpbmdUcmFuc2FjdGlv
bkNvdW50KAAAAAAoAAAAAHMPAAAAU2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAA
AA==</string> </value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
......@@ -211,7 +210,6 @@ aXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
<string>LOG</string>
<string>_getattr_</string>
<string>params</string>
<string>dict</string>
<string>kwd</string>
<string>context</string>
<string>preference</string>
......@@ -219,12 +217,12 @@ aXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
<string>_write_</string>
<string>at_date</string>
<string>section_category</string>
<string>_apply_</string>
<string>query</string>
<string>simulation_state</string>
<string>_getitem_</string>
<string>resource</string>
<string>currency</string>
<string>query</string>
<string>_getitem_</string>
<string>_apply_</string>
</tuple>
</value>
</item>
......
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