← Back to team overview

credativ team mailing list archive

[Branch ~credativ/openobject-addons/6.1] Rev 7046: General Ledger report does not sort by account code

 

------------------------------------------------------------
revno: 7046
fixes bug: https://launchpad.net/bugs/1198134
committer: Kinner Vachhani <kin.vachhani@xxxxxxxxx>
branch nick: credativ-openobject
timestamp: Fri 2013-07-05 12:29:15 +0100
message:
  General Ledger report does not sort by account code
modified:
  account/report/account_general_ledger.py


--
lp:~credativ/openobject-addons/6.1
https://code.launchpad.net/~credativ/openobject-addons/6.1

Your team credativ is subscribed to branch lp:~credativ/openobject-addons/6.1.
To unsubscribe from this branch go to https://code.launchpad.net/~credativ/openobject-addons/6.1/+edit-subscription
=== modified file 'account/report/account_general_ledger.py'
--- account/report/account_general_ledger.py	2012-10-17 11:17:02 +0000
+++ account/report/account_general_ledger.py	2013-07-05 11:29:15 +0000
@@ -32,6 +32,7 @@
 from common_report_header import common_report_header
 
 from tools.translate import _
+from operator import attrgetter
 
 class general_ledger(report_sxw.rml_parse, common_report_header):
     _name = 'report.account.general.ledger'
@@ -131,6 +132,7 @@
                 res.append(child_account)
         if not res:
             return [account]
+        res.sort(key=attrgetter('code'))
         return res
 
     def lines(self, account):