Issue 10961

Title
Misconfigured adjustment period can break general ledger
Priority
bug
Status
resolved
Nosy list
ced, pokoli, reviewbot, roundup-bot, timitos
Assigned to
ced
Keywords
review

Created on 2021-11-16.12:46:41 by timitos, last changed 1 week ago by roundup-bot.

Messages

New changeset f246fddee3dc by Cédric Krier in branch 'default':
Select all periods ending before the end period
https://hg.tryton.org/tryton-env/rev/f246fddee3dc
New changeset 8b4c201363d2 by Cédric Krier in branch 'default':
Select all periods ending before the end period
https://hg.tryton.org/modules/account/rev/8b4c201363d2
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-09-11.18:20:26

Indeed the goal of the search is to not include the adjustment period that starts and ends on the end date of the last standard period.
But by doing like we do (searching for end date before the start date), we exclude large adjustment periods like yours. Even if I think such large adjustment period should not be used, we could improve the clause.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-02-14.11:06:29

Any new information?

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-11-16.13:22:37
On 2021-11-16 12:46, Korbinian Preisler wrote:
> If you have
> *  fiscalyear from 2021-01-01 to 2021-12-31
> *  monthly accounting periods
> *  an adjustment period with start date 2021-01-01 and end date 2021-12-31
> 
> and you select the adjustment period as end period on the general ledger account form view
> the method get_periods_ids() from 'account.general_ledger.account' does not return proper period ids
> for computation of the account values.

Why is it not proper periods?

Rem:
    The rules to report issue are:

    * define the setup
    * state what is happening
    * state what should be happening.
Author: [hidden] (timitos) Tryton translator
Date: 2021-11-16.12:46:41

If you have * fiscalyear from 2021-01-01 to 2021-12-31 * monthly accounting periods * an adjustment period with start date 2021-01-01 and end date 2021-12-31

and you select the adjustment period as end period on the general ledger account form view
the method get_periods_ids() from 'account.general_ledger.account' does not return proper period ids
for computation of the account values.

I think that it was not intended to allow such configurations for the adjustment period. So maybe we need to add some constraints to prevent misconfiguration.

History
Date User Action Args
2022-09-25 20:17:33roundup-botsetmessages: + msg78293
2022-09-25 20:17:26roundup-botsetmessages: + msg78292
nosy: + roundup-bot
status: testing -> resolved
2022-09-11 18:45:39reviewbotsetmessages: + msg78025
nosy: + reviewbot
2022-09-11 18:22:03cedsetkeyword: + review
reviews: 427691003
status: in-progress -> testing
2022-09-11 18:20:26cedsetassignedto: ced
messages: + msg78024
status: need-eg -> in-progress
2022-02-14 11:06:29cedsetmessages: + msg74100
2021-11-18 10:20:11pokolisetnosy: + pokoli
2021-11-16 13:22:37cedsetmessages: + msg71687
nosy: + ced
status: unread -> need-eg
2021-11-16 12:46:41timitoscreate