Issue 10300

Title
Account balance should be checked removing it's type
Priority
bug
Status
chatting
Nosy list
ced, pokoli
Assigned to
Keywords

Created on 2021-04-16.10:47:55 by pokoli, last changed 5 months ago by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-16.12:53:02
On 2021-04-16 12:42, Sergi Almacellas Abellana wrote:
> El 16/4/21 a les 12:15, Cédric Krier ha escrit:
> > * BalanceNonDeferral should also try to balance closed account
> >       (normally they must already be balanced)
> 
> How we can create such balance? 

You can not be the error message will point the user that he needs to
reopen the account to balance it.

> For me we can only raise an error when closing a period which has some closed account with balance.

I think it will be too soon. Also the closing could be just temporary.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-16.12:42:24

El 16/4/21 a les 12:15, Cédric Krier ha escrit:

  • BalanceNonDeferral should also try to balance closed account
    (normally they must already be balanced)

How we can create such balance?
For me we can only raise an error when closing a period which has some closed account with balance.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-16.12:15:05
On 2021-04-16 12:08, Sergi Almacellas Abellana wrote:
> And as you comented we should validate that the account has no line when removing it's type.

I think there are some more enforcement to do if 'closed' is the way to
go:

    * The domain on move line should ignore the closed constraint for
      posted

    * BalanceNonDeferral should also try to balance closed account
      (normally they must already be balanced)
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-16.12:08:22

El 16/4/21 a les 11:55, Cédric Krier ha escrit:

Why not just close it?

Because had no idea that will cause any issue.
So if closing is the right way to go the validation should point to this procedure.

And as you comented we should validate that the account has no line when removing it's type.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-16.11:55:05
On 2021-04-16 11:14, Sergi Almacellas Abellana wrote:
> We are creating sub accounts of this account and we remove the type to avoid the user posting moves to the parent account.

Why not just close it?
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-16.11:14:57

We are creating sub accounts of this account and we remove the type to avoid the user posting moves to the parent account.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-16.11:05:37

What is the use case for removing the type? I think it will be better to prevent removing the type if the account has line.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-16.10:47:55

It is possible to remove the type of an account when it has some balance for the current period.
This situation produces an unbalanced chart so I think we should add a validation to prevent it so we should force the user to move the balances to a different account which has a type set so the amounts won't be lost in the balance.

History
Date User Action Args
2021-04-16 12:53:03cedsetmessages: + msg66667
2021-04-16 12:42:24pokolisetmessages: + msg66666
2021-04-16 12:15:05cedsetmessages: + msg66665
2021-04-16 12:08:22pokolisetmessages: + msg66664
2021-04-16 11:55:05cedsetmessages: + msg66663
2021-04-16 11:14:57pokolisetmessages: + msg66659
2021-04-16 11:05:37cedsetmessages: + msg66656
nosy: + ced
status: unread -> chatting
2021-04-16 10:47:55pokolicreate

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