[Erp5-report] r17313 - in /erp5/trunk/bt5/erp5_accounting: WorkflowTemplateItem/portal_work...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Oct 31 11:54:05 CET 2007


Author: jerome
Date: Wed Oct 31 11:54:05 2007
New Revision: 17313

URL: http://svn.erp5.org?rev=17313&view=rev
Log:
Better query to get transactions where we are source_section with start_date in range or destination_section with stop_date in range

Modified:
    erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/checkTransactionsState.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/checkTransactionsState.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/checkTransactionsState.xml?rev=17313&r1=17312&r2=17313&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/checkTransactionsState.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/checkTransactionsState.xml Wed Oct 31 11:54:05 2007
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -86,15 +83,25 @@
 \n
 section_uid = period.getParentUid()\n
 search_params = {\n
-  \'delivery.start_date\': dict(query=period.getStartDate(),\n
-                              range=\'min\'),\n
-  \'delivery.stop_date\': dict(query=period.getStopDate(),\n
-                             range=\'ngt\'),\n
   \'simulation_state\': invalid_simulation_state_list,\n
   \'portal_type\': portal.getPortalAccountingTransactionTypeList(),\n
-  \'query\': ComplexQuery(Query(source_section_uid=section_uid),\n
-                        Query(destination_section_uid=section_uid),\n
-                        operator=\'OR\')\n
+  \'query\': ComplexQuery( \n
+            \n
+             ComplexQuery( \n
+               Query(source_section_uid=section_uid),\n
+               Query(**{\'delivery.start_date\': [period.getStartDate(),\n
+                                                period.getStopDate()],\n
+                         \'range\': \'minngt\'}),\n
+               operator=\'AND\'),\n
+              \n
+             ComplexQuery( \n
+               Query(destination_section_uid=section_uid),\n
+               Query(**{\'delivery.stop_date\': [period.getStartDate(),\n
+                                               period.getStopDate()], \n
+                         \'range\': \'minngt\'}),\n
+               operator=\'AND\'),\n
+\n
+            operator=\'OR\')\n
 }\n
 \n
 transaction_list = portal.portal_catalog.searchResults(**search_params)\n
@@ -166,9 +173,8 @@
                             <string>state</string>
                             <string>invalid_simulation_state_list</string>
                             <string>section_uid</string>
-                            <string>dict</string>
+                            <string>_apply_</string>
                             <string>search_params</string>
-                            <string>_apply_</string>
                             <string>transaction_list</string>
                           </tuple>
                         </value>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=17313&r1=17312&r2=17313&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Wed Oct 31 11:54:05 2007
@@ -1,1 +1,1 @@
-461
+462




More information about the Erp5-report mailing list