Tryton - Issues

 

Issue3747

Title Readonly fields when party is inactive
Priority feature Status resolved
Superseder Flexible active
View: 4341
Nosy List albertca, ced, pokoli, reviewbot, roundup-bot
Type behavior Components trytond
Assigned To ced Keywords review
Reviews 295061011
View: 295061011

Created on 2014-03-09.23:29:12 by albertca, last changed by roundup-bot.

Messages
New changeset f9bd04b04774 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/tryton-env/rev/f9bd04b04774
New changeset 82df091bf5ae by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/trytond/rev/82df091bf5ae
New changeset 8211e86562fc by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/stock_supply/rev/8211e86562fc
New changeset fe76b9b69f5a by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/stock_location_sequence/rev/fe76b9b69f5a
New changeset da645fd3072b by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/stock/rev/da645fd3072b
New changeset b972ad1f8f18 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/sale_secondary_unit/rev/b972ad1f8f18
New changeset 6484110c8745 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/sale_product_customer/rev/6484110c8745
New changeset 424989ac10ad by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/sale/rev/424989ac10ad
New changeset 1b9170b04805 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/purchase_secondary_unit/rev/1b9170b04805
New changeset bc84e0700a5c by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/purchase/rev/bc84e0700a5c
New changeset d79c04469eac by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/production/rev/d79c04469eac
New changeset 6e00993a42c3 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/product_classification/rev/6e00993a42c3
New changeset 39e12a249fb0 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/product/rev/39e12a249fb0
New changeset 726561075abf by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/party_siret/rev/726561075abf
New changeset 33c09e388568 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/party/rev/33c09e388568
New changeset 739101408874 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/account_stock_landed_cost/rev/739101408874
New changeset d2497fd68623 by Cédric Krier in branch 'default':
Set all fields readonly for inactive records
https://hg.tryton.org/modules/account_asset/rev/d2497fd68623
review295061011 updated at https://codereview.tryton.org/295061011/#ps274931005
msg55570 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-02-24.19:02:15
I do not think. There are not properly speaking a logical deletion but visibility per period.
So for me, it is perfectly allowed to change an "inactive" record which was by the way already the case.
msg55569 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-02-24.18:50:45
I've just noticed that accounts and taxes are not set as readonly as they are  not a subclass of DeactivableMixin but a subclass of ActivePeriodMixin. 

I'm wondering if the same behaviour should be implemented on this models.
review295061011 updated at https://codereview.tryton.org/295061011/#ps278581002
review295061011 updated at https://codereview.tryton.org/295061011/#ps286761002
review295061011 updated at https://codereview.tryton.org/295061011/#ps272891002
review295061011 updated at https://codereview.tryton.org/295061011/#ps283011002
msg33958 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-06-08.11:13:31
> I would prefer to have separate implementation and to not move all features in one big change.

So then we should implement this feature after issue4341 is resolved.

The implementation will be quite simple. Make all fields readonly (except active field) if model is not active.
msg33956 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-06-08.11:10:44
I would prefer to have separate implementation and to not move all features in one big change.
msg33954 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-06-08.11:00:39
msg16082 will be implemented by issue4341, so I'm moving the discussion there.
msg16101 (view) Author: [hidden] (albertca) (Tryton committer) Date: 2014-03-11.12:11:00
Agreed.
msg16082 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2014-03-10.14:03:48
Indeed I mean it was wrong to make it readonly with server side code.
Probably it could be implemented on client side (like the history which makes
also record readonly).
Also to improve this, the name of the activatable field should be a custom
parameter like _rec_name that must be sent to the client with the Model definition.
msg16072 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2014-03-10.00:24:51
I think it was a wrong idea to make it readonly.
msg16071 (view) Author: [hidden] (albertca) (Tryton committer) Date: 2014-03-09.23:29:11
When a party is deactivated all fields of the form are set to readonly so the user 
cannot change them. However, several modules extend the party form which do not 
follow the same behaviour. Some examples of such fields/modules are:

- tax rules
- stock locations
- bank accounts
- sale pricelist
- sale invoice grouping

Exactly the same problem exists with the product form.

We should standarize this:

- The easiest thing is to change all those modules to have the same STATES 
definition.
- We could allow modifying those fields
- We could try to find a way to make all fields readonly (except "active")
History
Date User Action Args
2020-03-17 20:09:43roundup-botsetmessages: + msg56342
2020-03-17 20:09:38roundup-botsetmessages: + msg56341
2020-03-17 20:09:35roundup-botsetmessages: + msg56340
2020-03-17 20:09:30roundup-botsetmessages: + msg56339
2020-03-17 20:09:27roundup-botsetmessages: + msg56338
2020-03-17 20:09:22roundup-botsetmessages: + msg56337
2020-03-17 20:09:19roundup-botsetmessages: + msg56336
2020-03-17 20:09:15roundup-botsetmessages: + msg56335
2020-03-17 20:09:09roundup-botsetmessages: + msg56334
2020-03-17 20:09:05roundup-botsetmessages: + msg56333

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