Has someone already created new children accounts to fit accountant chart of account?
=> Account 6226 split into 62260, 62261, 62262…
The problem is that I have already some lines in the parent account (here 6226) and even if it is balanced, the final balance is wrong as the moves are accounted twice: those of the parent and those of the children.
The problem is because you have some moves in the parent account. You move the parent moves into the children accounts and then close the parent account to avoid creating new moves on the parent.
I did credit the parent account and debit the children. Is that what you mean?
By doing so, I end up with a parent account with as many debit amount as credit, as shown in my previous screenshot. Looks good except that its final balance takes into account children.
Now, I cannot close (by the user interface) the parent account since there still lives original moves. Should I force close by SQL query hoping to get a correct balance?
I do not understand why you say that the balance is wrong. For me the numbers look correct. The debit/credit are always only for the account and the balance is cumulateur with the children.
Once an account has moves, you can no more close it. At best you deactivate it by setting an end date but it will require to end also its children accounts.
This could be an improvement to add a way to prevent to use an account for future move.
Hum it seems you are looking at the general ledger and not the chart of accounts.
I can see that as it is a flat structure that using the balance of the account (which is designed for the tree structure) may not be the best option.
We should probably have a contextual flag to calculate the account balance for flat structure.
Sorry about not clarifying. By moving I mean you should use an sql query to update the moves accounts where the parent is used and use a children for it. After running such query you will be able to close the account and the balance will show as you expect.
And I consider the need for specifying the chart of account by adding new children as the need evolves is a legitimate use case.
So touching SQL db for that should be prohibited from a user point of view, in my opinion.
By the way, I may have noticed duplicate moves exported to the general ledger report, due to the same dual scan of the tree structure. But I will check again when I get back on Tryton!
When trying to set an End Date to the parent account (in the future or in the past), I get the following error (in French):
La valeur « 62260 - Honoraires comptables, 62261 - Honoraires juridiques, 62262 - Honoraires AGO » du champ « Enfants » sur l'enregistrement « 6226 - Honoraires » de « Compte » n'est pas valide selon son domaine.
If you set an end date to the parent, you must also set it also to its children.
So end date is not a solution. So there is only the closing of the account but instead of being a boolean it should be based on a date.