From 94581234e96836ea5dee23650fa9509e24ec9e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Wed, 11 Feb 2015 00:18:13 +0100 Subject: [PATCH] Use dotted notation in order for General Ledger move lines query issue 4447 review10771002 --- account.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/account.py b/account.py index 63fb21e018..23ab3eb38b 100644 --- a/account.py +++ b/account.py @@ -1249,12 +1249,10 @@ class GeneralLedger(Report): clause.append(('move.state', '=', 'posted')) lines = MoveLine.search(clause, order=[ - ('account', 'ASC'), # TODO replace by account.id + ('account.id', 'ASC'), ('date', 'ASC'), ]) - key = operator.attrgetter('account') - lines.sort(key=key) - return groupby(lines, key) + return groupby(lines, operator.attrgetter('account')) @classmethod def lines(cls, accounts, periods, posted):