Merge pull request #13252 from achillesrasquinha/py3

sort by name accounts for trial balance.
This commit is contained in:
Achilles Rasquinha 2018-03-09 15:23:28 +05:30 committed by GitHub
commit 138a4850fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,7 +175,7 @@ def accumulate_values_into_parents(accounts, accounts_by_name):
def prepare_data(accounts, filters, total_row, parent_children_map, company_currency):
data = []
tmpaccnt = sorted(accounts)
tmpaccnt = sorted(accounts, key = lambda account: account.name)
if not (accounts[0].account_number is None):
accounts = tmpaccnt