[Erp5-report] r24949 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 19 13:33:56 CET 2008
Author: jerome
Date: Fri Dec 19 13:33:53 2008
New Revision: 24949
URL: http://svn.erp5.org?rev=24949&view=rev
Log:
don't use low level Query.__call__ , use portal_catalog.buildSQLQuery instead
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_countAccountingTransactionList.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingTransactionList.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_countAccountingTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_countAccountingTransactionList.xml?rev=24949&r1=24948&r2=24949&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_countAccountingTransactionList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_countAccountingTransactionList.xml [utf8] Fri Dec 19 13:33:53 2008
@@ -59,17 +59,12 @@
kw[\'omit_input\'] = 0\n
kw[\'omit_output\'] = 0\n
\n
-from Products.ZSQLCatalog.SQLCatalog import Query\n
if kw.get(\'operation_date\', {}).get(\'query\'):\n
- operation_date_dict = kw[\'operation_date\']\n
- ss_q = Query(format=operation_date_dict[\'format\'],\n
- type=operation_date_dict[\'type\'],\n
- **{\'delivery.start_date\':operation_date_dict[\'query\']})\n
- kw[\'source_section_where_expression\'] = ss_q(datetime_search_keys=[\'delivery.start_date\'])[\'where_expression\']\n
- ds_q = Query(format=operation_date_dict[\'format\'],\n
- type=operation_date_dict[\'type\'],\n
- **{\'delivery.stop_date\':operation_date_dict[\'query\']})\n
- kw[\'destination_section_where_expression\'] = ds_q(datetime_search_keys=[\'delivery.stop_date\'])[\'where_expression\']\n
+ buildSQLQuery = context.portal_catalog.buildSQLQuery\n
+ kw[\'source_section_where_expression\'] = buildSQLQuery(\n
+ **{\'delivery.start_date\': kw[\'operation_date\']})[\'where_expression\']\n
+ kw[\'destination_section_where_expression\'] = buildSQLQuery(\n
+ **{\'delivery.stop_date\': kw[\'operation_date\']})[\'where_expression\']\n
del kw[\'operation_date\']\n
\n
return context.AccountingTransactionModule_zGetAccountingTransactionList( selection=None,\n
@@ -118,14 +113,10 @@
<string>kw</string>
<string>_getattr_</string>
<string>_write_</string>
- <string>Products.ZSQLCatalog.SQLCatalog</string>
- <string>Query</string>
+ <string>context</string>
+ <string>buildSQLQuery</string>
<string>_getitem_</string>
- <string>operation_date_dict</string>
<string>_apply_</string>
- <string>ss_q</string>
- <string>ds_q</string>
- <string>context</string>
<string>None</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingTransactionList.xml?rev=24949&r1=24948&r2=24949&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingTransactionList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingTransactionList.xml [utf8] Fri Dec 19 13:33:53 2008
@@ -59,8 +59,6 @@
# Because DTML cannot do <dtml-if node or resource or...>\n
# If Python is used, it does not check the existence of a variable automatically\n
\n
-from Products.ZSQLCatalog.SQLCatalog import Query\n
-\n
if \'node\' not in params:\n
params[\'node\'] = []\n
if \'resource\' not in params:\n
@@ -79,17 +77,16 @@
params[\'omit_input\'] = 0\n
params[\'omit_output\'] = 0\n
\n
+\n
+\n
if params.get(\'operation_date\', {}).get(\'query\'):\n
- operation_date_dict = params[\'operation_date\']\n
- ss_q = Query(format=operation_date_dict[\'format\'],\n
- type=operation_date_dict[\'type\'],\n
- **{\'delivery.start_date\':operation_date_dict[\'query\']})\n
- params[\'source_section_where_expression\'] = ss_q(datetime_search_keys=[\'delivery.start_date\'])[\'where_expression\']\n
- ds_q = Query(format=operation_date_dict[\'format\'],\n
- type=operation_date_dict[\'type\'],\n
- **{\'delivery.stop_date\':operation_date_dict[\'query\']})\n
- params[\'destination_section_where_expression\'] = ds_q(datetime_search_keys=[\'delivery.stop_date\'])[\'where_expression\']\n
+ buildSQLQuery = context.portal_catalog.buildSQLQuery\n
+ params[\'source_section_where_expression\'] = buildSQLQuery(\n
+ **{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n
+ params[\'destination_section_where_expression\'] = buildSQLQuery(\n
+ **{\'delivery.stop_date\': params[\'operation_date\']})[\'where_expression\']\n
del params[\'operation_date\']\n
+\n
\n
# this method can be used to build another complex query, for example\n
# as a catalog.parent_uid filter with SimulationTool.getMovementList.\n
@@ -143,16 +140,12 @@
<value>
<tuple>
<string>params</string>
- <string>Products.ZSQLCatalog.SQLCatalog</string>
- <string>Query</string>
<string>_write_</string>
<string>_getattr_</string>
+ <string>context</string>
+ <string>buildSQLQuery</string>
<string>_getitem_</string>
- <string>operation_date_dict</string>
<string>_apply_</string>
- <string>ss_q</string>
- <string>ds_q</string>
- <string>context</string>
<string>src__</string>
<string>no_limit</string>
<string>None</string>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml?rev=24949&r1=24948&r2=24949&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml [utf8] Fri Dec 19 13:33:53 2008
@@ -59,18 +59,12 @@
params[\'omit_input\'] = 1\n
params[\'omit_output\'] = 0\n
\n
-from Products.ZSQLCatalog.SQLCatalog import Query\n
-\n
if params.get(\'operation_date\', {}).get(\'query\'):\n
- operation_date_dict = params[\'operation_date\']\n
- ss_q = Query(format=operation_date_dict[\'format\'],\n
- type=operation_date_dict[\'type\'],\n
- **{\'delivery.start_date\':operation_date_dict[\'query\']})\n
- params[\'source_section_where_expression\'] = ss_q(datetime_search_keys=[\'delivery.start_date\'])[\'where_expression\']\n
- ds_q = Query(format=operation_date_dict[\'format\'],\n
- type=operation_date_dict[\'type\'],\n
- **{\'delivery.stop_date\':operation_date_dict[\'query\']})\n
- params[\'destination_section_where_expression\'] = ds_q(datetime_search_keys=[\'delivery.stop_date\'])[\'where_expression\']\n
+ buildSQLQuery = context.portal_catalog.buildSQLQuery\n
+ params[\'source_section_where_expression\'] = buildSQLQuery(\n
+ **{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n
+ params[\'destination_section_where_expression\'] = buildSQLQuery(\n
+ **{\'delivery.stop_date\': params[\'operation_date\']})[\'where_expression\']\n
del params[\'operation_date\']\n
\n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
@@ -122,13 +116,9 @@
<string>context</string>
<string>params</string>
<string>_write_</string>
- <string>Products.ZSQLCatalog.SQLCatalog</string>
- <string>Query</string>
+ <string>buildSQLQuery</string>
<string>_getitem_</string>
- <string>operation_date_dict</string>
<string>_apply_</string>
- <string>ss_q</string>
- <string>ds_q</string>
<string>result</string>
<string>row</string>
<string>float</string>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml?rev=24949&r1=24948&r2=24949&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml [utf8] Fri Dec 19 13:33:53 2008
@@ -59,18 +59,12 @@
params[\'omit_output\'] = 1\n
params[\'omit_input\'] = 0\n
\n
-from Products.ZSQLCatalog.SQLCatalog import Query\n
-\n
if params.get(\'operation_date\', {}).get(\'query\'):\n
- operation_date_dict = params[\'operation_date\']\n
- ss_q = Query(format=operation_date_dict[\'format\'],\n
- type=operation_date_dict[\'type\'],\n
- **{\'delivery.start_date\':operation_date_dict[\'query\']})\n
- params[\'source_section_where_expression\'] = ss_q(datetime_search_keys=[\'delivery.start_date\'])[\'where_expression\']\n
- ds_q = Query(format=operation_date_dict[\'format\'],\n
- type=operation_date_dict[\'type\'],\n
- **{\'delivery.stop_date\':operation_date_dict[\'query\']})\n
- params[\'destination_section_where_expression\'] = ds_q(datetime_search_keys=[\'delivery.stop_date\'])[\'where_expression\']\n
+ buildSQLQuery = context.portal_catalog.buildSQLQuery\n
+ params[\'source_section_where_expression\'] = buildSQLQuery(\n
+ **{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n
+ params[\'destination_section_where_expression\'] = buildSQLQuery(\n
+ **{\'delivery.stop_date\': params[\'operation_date\']})[\'where_expression\']\n
del params[\'operation_date\']\n
\n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
@@ -121,13 +115,9 @@
<string>context</string>
<string>params</string>
<string>_write_</string>
- <string>Products.ZSQLCatalog.SQLCatalog</string>
- <string>Query</string>
+ <string>buildSQLQuery</string>
<string>_getitem_</string>
- <string>operation_date_dict</string>
<string>_apply_</string>
- <string>ss_q</string>
- <string>ds_q</string>
<string>result</string>
<string>row</string>
<string>float</string>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=24949&r1=24948&r2=24949&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Fri Dec 19 13:33:53 2008
@@ -1,1 +1,1 @@
-837
+839
More information about the Erp5-report
mailing list