Error during tryton 5.6 to 5.8 database migration

While updating a tryton 5.6 database to 5.8 I get this kind of error message

13668 13432 [2021-03-11 16:47:52,385] ERROR trytond.convert Could not delete id:
 2 of model account.account.type.template
There should be some relation that points to this resource
You should manually fix this and restart --update=module
Traceback (most recent call last):
  File "C:\Python373_Virtualenvs\tryton58\lib\site-packages\trytond\",
 line 807, in post_import
  File "C:\Python373_Virtualenvs\tryton58\lib\site-packages\trytond\model\models", line 159, in wrapper
    return func(cls, *args, **kwargs)
  File "C:\Python373_Virtualenvs\tryton58\lib\site-packages\trytond\model\models", line 1152, in delete
trytond.model.modelsql.ForeignKeyError: Les enregistrements ne peuvent pas être
supprimés car ils sont utilisés par le champ « Parent » de « Modèle de type de c
ompte ». -

Do you advise to manually delete children records related to parents and then restart the update ?


I think it is safer to launch multiple times the update so if there are children that have been re-affected to other parent they will be kept.
By the way which chart of account is this? You will need to take care of the chart of account synchronization because it can not delete record for which the template has been deleted.

We are using the french chart of account
I’ll try to run several times the update to see if it can solve the issue

Thanks for your help

I run the update many times as you suggested and the issue was solved

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.