I have an old version of GNU Health (3.6) based on tryton 5.0 with OHADA accounting configured manually. I am currently trying to shape the last version of GNU Health 5.0 (Tryton 7.0) to have the same accounting. We are injecting data (Accounts and Account Types) directly into the database and configuring the accounting system manually (without using the standard chart of accounts templates).
We have successfully imported the data, but we are facing two main challenges:
Hierarchy Integrity: We have scripts to rebuild the parent-child relationships for both account.account and account.account.type based on our production data. However, even with the links present in the database, the tree view in the client doesn’t seem to reflect the hierarchy as expected.
Domain Validation Errors: When setting the parent field, we often hit DomainValidationError (specifically regarding receivable and payable flags). It seems Tryton 7.0 has stricter requirements for attribute consistency between parent and child types than previous versions.
Our questions to the community:
Are there mandatory fields or “root” configurations in account.configuration or account.account_config that must be set for the hierarchy to be properly recognized by the UI in version 7.0?
Besides receivable and payable flags, are there other consistency checks between parent/child types that we should be aware of when building the tree manually?
Is there a specific “View” type or account state required for parent accounts to aggregate their children correctly in the new version?
Any guidance on the “minimal viable configuration” for a manually injected chart of accounts would be greatly appreciated.
No, account configuration normally just defines default values (like default payable accounts)
In recent series in order to specify an account as “View” you just set the type as empty. Tryton enforces that only accounts with types can be used for account move lines. You should probalby check that.
The chart of accounts is using MPTT fields. They are normally kept in sync when using the ORM but if you manipulate the data using SQL, you must recompute them (you can call Account._rebuild_tree('parent', None, 0) to rebuild the all tree).
Yes you can see the domain applied to the types of an accounting in AccountMixin. The children of accounts must have the same type has their parents if these lasts have a type.
Although we have successfully generated a consistent account structure, we are struggling to align our custom account types with the strict constraints of Tryton 7—specifically the account_account_only_one_debit_credit_types check constraint. Furthermore, some imported accounts do not appear in the configuration wizards.
Has anyone already implemented the SYSCOHADA 2018 plan as an XML module (Template) for Tryton 7.x? Alternatively, is there specific documentation on creating custom account.account.type.template records so they are natively recognized by version 7’s financial reports and configuration domains?
Any guidance on integrating regional specific charts of accounts in recent versions would be a great help in unblocking our deployment.