Commit 78758af2 authored by Jérome Perrin's avatar Jérome Perrin

support limit= parameter in getMovementHistoryList


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29204 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7bd7710b
......@@ -69,6 +69,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>limit_expression</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>omit_input</string> </key>
<value>
......@@ -151,6 +157,7 @@
<string>where_expression</string>
<string>order_by_expression</string>
<string>group_by_expression</string>
<string>limit_expression</string>
<string>selection_domain</string>
<string>selection_report</string>
<string>ignore_variation</string>
......@@ -587,6 +594,7 @@
where_expression\r\n
order_by_expression\r\n
group_by_expression\r\n
limit_expression\r\n
selection_domain\r\n
selection_report\r\n
ignore_variation\r\n
......@@ -758,6 +766,12 @@ GROUP BY\n
ORDER BY\n
<dtml-var order_by_expression>\n
</dtml-if>\n
\n
<dtml-if limit_expression>\n
LIMIT\n
<dtml-var limit_expression>\n
</dtml-if>\n
\n
) AS q1\n
......@@ -918,6 +932,12 @@ GROUP BY\n
ORDER BY\n
<dtml-var order_by_expression>\n
</dtml-if>\n
\n
<dtml-if limit_expression>\n
LIMIT\n
<dtml-var limit_expression>\n
</dtml-if>\n
\n
) AS q1\n
......
1308
\ No newline at end of file
1309
\ No newline at end of file
......@@ -1228,15 +1228,12 @@ class TestMovementHistoryList(InventoryAPITestCase):
getMovementHistoryList(section_uid=self.section.getUid(),
sort_on=(('title', 'descending'),)) ])
# FIXME: do we want to include it or no ?
def test_Limit(self):
return "is it part of this API ?" # XXX
getMovementHistoryList = self.getSimulationTool().getMovementHistoryList
for q in range(10):
for q in range(6):
self._makeMovement(quantity=1)
self.assertEquals(3, len(getMovementHistoryList(list_start=2,
list_lines=3)))
self.assertEquals(3, len(getMovementHistoryList(limit=3)))
self.assertEquals(4, len(getMovementHistoryList(limit=(1, 4))))
def test_SimulationState(self):
getMovementHistoryList = self.getSimulationTool().getMovementHistoryList
......
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