Issue 10249

Title
Start balance on general ledger does not take start date into account
Priority
bug
Status
testing
Nosy list
ced, pokoli, reviewbot, smn
Assigned to
pokoli
Keywords
backport, review

Created on 2021-04-05.10:25:55 by smn, last changed yesterday by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-09.17:07:01

I'm pretty sure there is a problem with _cumulate and also one with period_ids being an empty list instead of None when no period is selected but dates are filled.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-09.16:05:57

cumulate is not related. On the demo database there is no closed fiscalyear.

The problem is that the amounts of the current period are not included on the start balance. Let me put and example.

If you have a move on 09/04/2021 of 100€ you can observe the following behaviour:

Without start_date start balance is zero:
Using 10/04/2021 the start balance is zero.

On the second case, the start balance should be 100€ as the move is done before the date filter.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-08.22:48:28

I do not understand the proposed change. For me the problem is not on GL but on Account._cumulate.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-08.15:39:49

Here is a review348161002 that fixes the issue.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-05.11:45:10

I guess from_date and to_date must also be removed from the context when computing for non-closed years.

Author: [hidden] (smn)
Date: 2021-04-05.10:25:55

I notice when defining an start date on general ledger account the start balance is not computed correctly.
Can be reproduced on demo.tryton.org:

Fiscal year: 2020
Account: Main receivable
Start balance with no start date: 0€
Start balance with start date 1/10/2020: 0€ (should be 1924,45€)

Indeed neither general ledger line the balance with https://bugs.tryton.org/issue9791 works as expected when defining start date.

History
Date User Action Args
2021-04-09 17:07:01cedsetmessages: + msg66234
2021-04-09 16:05:57pokolisetmessages: + msg66231
2021-04-08 22:48:28cedsetmessages: + msg66190
2021-04-08 15:49:58reviewbotsetmessages: + msg66180
nosy: + reviewbot
2021-04-08 15:39:49pokolisetkeyword: + backport, review
messages: + msg66177
reviews: 348161002
status: in-progress -> testing
2021-04-08 15:28:31pokolisetassignedto: pokoli
nosy: + pokoli
status: chatting -> in-progress
type: behavior
2021-04-05 11:45:10cedsetmessages: + msg66075
nosy: + ced
status: unread -> chatting
2021-04-05 10:25:55smncreate

Showing 10 items. Show all history (warning: this could be VERY long)