Tryton - Issues



Title Improve tax update from template
Priority bug Status resolved
Superseder Nosy List Timitos, ced, pokoli, reviewbot, roundup-bot
Type behavior Components account
Assigned To ced Keywords review
Reviews 54441002
View: 54441002

Created on 2018-09-21.22:27:51 by ced, last changed by roundup-bot.

New changeset d796a7159ebd by Cédric Krier in branch 'default':
Add active on tax template
New changeset 89e7d17d4865 by Cédric Krier in branch 'default':
Add active on tax template
review54441002 updated at
msg44998 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-25.11:36:40
I do not think this should apply to tax code because it is not used a reference and it has the ActivePeriodMixin.
msg44016 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-21.22:27:51
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.
Date User Action Args
2018-12-17 23:05:32roundup-botsetmessages: + msg45368
2018-12-17 23:05:26roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg45367
2018-11-25 14:47:37reviewbotsetnosy: + reviewbot
messages: + msg45007
2018-11-25 14:26:07cedsetstatus: in-progress -> testing
reviews: 54441002
keyword: + review
2018-11-25 11:36:40cedsetstatus: unread -> in-progress
assignedto: ced
messages: + msg44998
2018-11-25 11:33:03cedsetpriority: feature -> bug
type: feature request -> behavior
2018-10-22 11:21:49pokolisetnosy: + pokoli
2018-09-22 08:32:07Timitossetnosy: + Timitos
2018-09-21 22:27:51cedcreate

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