Created on 2021-04-05.10:25:55 by smn, last changed 3 weeks ago by nicoe.
* Sergi Almacellas Abellana [2021-05-24 08:55 +0200]: > >Sergi Almacellas Abellana <email@example.com> added the comment: > >@nicoe could you share the difference between both patches? Yes I replied in a hurry yesterday. My patch considers that you use either periods or dates but not both thus it does not require to change MoveLine.query_get (basicaly you put the complexity in query_get I put it in get_account). But it misses your change on _cumulate (which is not related to the issue but is nice anyway because it resets the context). I also changed the tests differently (so that we can test on the same fiscalyear the period before the move are added, the period where they're added and afterwards).
@nicoe could you share the difference between both patches?
I also wrote a patch about this issue (but a different one)
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.
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.
I do not understand the proposed change. For me the problem is not on GL but on
Here is a review348161002 that fixes the issue.
to_date must also be removed from the context when computing for non-closed years.
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.
|2021-05-24 11:55:49||nicoe||set||messages: + msg67791|
|2021-05-24 08:55:34||pokoli||set||messages: + msg67788|
nosy: + nicoe
reviews: 348161002 -> 348161002, 351991002
|2021-05-12 18:18:35||reviewbot||set||messages: + msg67547|
|2021-04-26 08:46:43||reviewbot||set||messages: + msg66955|
|2021-04-25 11:14:49||reviewbot||set||messages: + msg66930|
|2021-04-25 09:19:34||reviewbot||set||messages: + msg66925|
|2021-04-09 17:07:01||ced||set||messages: + msg66234|
|2021-04-09 16:05:57||pokoli||set||messages: + msg66231|
|2021-04-08 22:48:28||ced||set||messages: + msg66190|
Showing 10 items. Show all history (warning: this could be VERY long)