Party payable/receivable shows incorrect balance on closing fiscal year
Party payable receivable balance is incorrect on closing fiscal years and the Move.query_get query selects only open fiscal years.
Patch for test case to test this: https://gist.github.com/sharoonthomas/24d80df317c24cf075e83d877b99deac
With this patch, the test would fail with:
AssertionError: Decimal('0.0') != Decimal('300')
My diagnosis of the issue:
This block of code in query_get [1] limits the move lines to the ones only in open fiscal years. So if the balance is receivable it ignores the ones in closed fiscal years yielding a balance that is lower than actual balance.
[1] https://github.com/tryton/account/blob/dab209253f577b1ff6f22681349a307e5354b977/move.py#L1310-L1315