Commit 0b75c584 authored by Jérome Perrin's avatar Jérome Perrin

PaymentTransaction_selectMovement could select movements by date

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18797 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e7d25f7d
......@@ -70,9 +70,11 @@
kw[\'parent_specialise_portal_type\'] = \'Payment Rule\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
kw[\'max_movement_date\'] = DateTime() + 30\n
\n
movement_list = [x.getObject() for x in context.PaymentTransaction_zSelectMovement(**kw)]\n
LOG("SQL used = %s"%context.PaymentTransaction_zSelectMovement(src__=1, **kw))\n
movement_list = [x.getObject() for x in context.PaymentTransaction_zSelectMovement(**kw)]\n
\n
LOG("movement_list = %s"%movement_list)\n
return movement_list\n
</string> </value>
......@@ -124,6 +126,7 @@ return movement_list\n
<string>_getattr_</string>
<string>_apply_</string>
<string>context</string>
<string>DateTime</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
......
......@@ -48,6 +48,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>max_movement_date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>order_by_expression</string> </key>
<value>
......@@ -70,6 +76,7 @@
<string>from_table_list</string>
<string>where_expression</string>
<string>order_by_expression</string>
<string>max_movement_date</string>
</list>
</value>
</item>
......@@ -88,7 +95,8 @@
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression</string> </value>
order_by_expression\r\n
max_movement_date</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
......@@ -153,17 +161,23 @@ WHERE\n
AND <dtml-var where_expression> \n
</dtml-if>\n
\n
AND parent.uid = catalog.parent_uid\n
AND parent.uid = catalog.parent_uid\n
AND grandparent.uid = parent.parent_uid\n
AND grandparent.simulation_state in (\'confirmed\', \'stopped\', \'delivered\')\n
\n
AND movement.source_uid is not NULL\n
AND ((\n
grandparent.simulation_state NOT IN (\'cancelled\', \'deleted\')\n
AND ( movement.start_date < <dtml-sqlvar max_movement_date type="datetime"> OR \n
movement.stop_date < <dtml-sqlvar max_movement_date type="datetime"> )\n
) OR (\n
grandparent.simulation_state in (\'confirmed\', \'stopped\', \'delivered\')\n
))\n
\n
AND movement.uid = catalog.uid\n
AND movement.resource_uid is not NULL\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>
]]></string> </value>
......@@ -229,17 +243,23 @@ WHERE\n
AND <dtml-var where_expression> \n
</dtml-if>\n
\n
AND parent.uid = catalog.parent_uid\n
AND parent.uid = catalog.parent_uid\n
AND grandparent.uid = parent.parent_uid\n
AND grandparent.simulation_state in (\'confirmed\', \'stopped\', \'delivered\')\n
\n
AND movement.source_uid is not NULL\n
AND ((\n
grandparent.simulation_state NOT IN (\'cancelled\', \'deleted\')\n
AND ( movement.start_date < <dtml-sqlvar max_movement_date type="datetime"> OR \n
movement.stop_date < <dtml-sqlvar max_movement_date type="datetime"> )\n
) OR (\n
grandparent.simulation_state in (\'confirmed\', \'stopped\', \'delivered\')\n
))\n
\n
AND movement.uid = catalog.uid\n
AND movement.resource_uid is not NULL\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>
]]></string> </value>
......
546
\ No newline at end of file
547
\ No newline at end of file
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