Delete an account move template

Trying to delete an account move template, I have to delete all keywords, all taxes and all move lines first, i.e. a move template must be complete empty to be deleted. If not a similar error appears:

Is it an intended behavior?

Hi @srgdts,

No, this is not the intended behaviour. Once the move template is deleted the related keywords should be also deleted also. But unfortunatly we are missing an ondelete='CASCADE' in the move field of keyword model.

It will be great if you can fill an issue and submit a change to imporve it.

1 Like

I filled Issue 11868: Missing ondelete CASCADE on One2Many reverse target of move template - Tryton issue tracker
Meanwhile you can solve the problem by deleting the lines (and the taxes) and keywords of the template first and then delete the template.

1 Like

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