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

AccountingTransactionModule_getPaySheetMovementMirrorSectionItemList:

- don't group by section, so that the same service provider used with different section appears only once
- use key= when sorting for better performance

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23900 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 11539c55
......@@ -61,6 +61,7 @@ for x in portal.portal_simulation.getInventoryList(\n
portal_type=(\'Pay Sheet Cell\',\n
\'Pay Sheet Line\'),\n
group_by_resource=0,\n
group_by_section=0,\n
group_by_mirror_section=1):\n
mirror_section_uid = x.mirror_section_uid\n
if mirror_section_uid:\n
......@@ -69,7 +70,7 @@ for x in portal.portal_simulation.getInventoryList(\n
item_list.append((mirror_section.getTitle(),\n
mirror_section.getRelativeUrl()))\n
\n
item_list.sort(lambda a, b: cmp(a[0], b[0]))\n
item_list.sort(key=lambda a:a[0])\n
return item_list\n
</string> </value>
</item>
......
319
\ No newline at end of file
320
\ 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