Tryton - Issues

 

Message44016

Author ced
Recipients
Date 2018-09-21.22:27:51
Content
With issue6013, we had to rework some taxes by removing children tax templates etc. Unfortunately when we remove the template, the instance is not removed when updating the chart from template. This is because the template Many2One is set with ondelete='SET NULL'. This is not very user-friendly as the taxes must be manually adapted.

I propose to set the ondelete to 'RESTRICT' and to add ActiveMixin on the template and tax (also for tax code). This way when updating the template from XML, it will fail to delete the template record (if used on an instance) so it will just deactivate it. The update chart from template will later update the active field to the instance.
History
Date User Action Args
2018-09-21 22:27:51cedsetmessageid: <1537561671.98.0.573454953593.issue7718@tryton.org>
2018-09-21 22:27:51cedlinkissue7718 messages
2018-09-21 22:27:51cedcreate

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