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
<field name="balance" sum="Balance"/>
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.