odoo/odoo — pull request #934 by AlanBell (2014-07-04 13:48:46+00:00)
Title: Account balance is not calculating quite right for entries not entered in date order

Impacted versions:

6.0 and above
Steps to reproduce:

create a journal item, then create a journal item with an earlier date than the first one
you can add a balance field to the account.move.line.tree view

which will show a running balance within the account

Current behavior:
it is wrong for items created out-of order because it currently sorts on id rather than prioritising the transaction date.
Expected behavior
running balance should exactly match that shown on the paper bank statement provided by the bank.