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 ...@@ -61,6 +61,7 @@ for x in portal.portal_simulation.getInventoryList(\n
portal_type=(\'Pay Sheet Cell\',\n portal_type=(\'Pay Sheet Cell\',\n
\'Pay Sheet Line\'),\n \'Pay Sheet Line\'),\n
group_by_resource=0,\n group_by_resource=0,\n
group_by_section=0,\n
group_by_mirror_section=1):\n group_by_mirror_section=1):\n
mirror_section_uid = x.mirror_section_uid\n mirror_section_uid = x.mirror_section_uid\n
if mirror_section_uid:\n if mirror_section_uid:\n
...@@ -69,7 +70,7 @@ for x in portal.portal_simulation.getInventoryList(\n ...@@ -69,7 +70,7 @@ for x in portal.portal_simulation.getInventoryList(\n
item_list.append((mirror_section.getTitle(),\n item_list.append((mirror_section.getTitle(),\n
mirror_section.getRelativeUrl()))\n mirror_section.getRelativeUrl()))\n
\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 return item_list\n
</string> </value> </string> </value>
</item> </item>
......
319 320
\ No newline at end of file \ 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