Tryton - Issues

 

Issue7851

Title Add MultiSelection field
Priority feature Status resolved
Superseder Nosy List ced, pokoli, reviewbot, roundup-bot
Type feature request Components proteus, sao, stock_lot, tryton, trytond
Assigned To ced Keywords review
Reviews 56481002,249911002
View: 56481002, 249911002

Created on 2018-11-11.21:36:22 by pokoli, last changed by roundup-bot.

Messages
New changeset 117898b24564 by Cédric Krier in branch 'default':
Add MultiSelection field
https://hg.tryton.org/tryton-env/rev/117898b24564
New changeset a4c93080488a by Cédric Krier in branch 'default':
Add MultiSelection field
https://hg.tryton.org/trytond/rev/a4c93080488a
New changeset 8f206d78a816 by Cédric Krier in branch 'default':
Add MultiSelection field
https://hg.tryton.org/tryton/rev/8f206d78a816
New changeset c89223c0da9c by Cédric Krier in branch 'default':
Add MultiSelection field
https://hg.tryton.org/sao/rev/c89223c0da9c
New changeset 6236c017ce04 by Cédric Krier in branch 'default':
Add MultiSelection field
https://hg.tryton.org/proteus/rev/6236c017ce04
New changeset 8c79b0263dfa by Cédric Krier in branch 'default':
Use MultiSelection for lot_required
https://hg.tryton.org/modules/stock_lot/rev/8c79b0263dfa
review249911002 updated at https://codereview.tryton.org/249911002/#ps254331002
review249911002 updated at https://codereview.tryton.org/249911002/#ps284071002
review249911002 updated at https://codereview.tryton.org/249911002/#ps273961002
msg51652 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-09-04.17:48:45
Here is review249911002 which implement a MultiSelection field stored a JSON list.
I have implemented a search with the 'in' operator as search for any keys/item to exist if the value is a list and if the value is a string as search for this key.
The MultiSelection can be stored in a JSONB field if optimization is needed.
On the client sides, the existing MultiSelection widget is reused and stay compatible for multiselection and xxx2many. The field can be display on a tree but can not be edited, we do not have yet a simple widget for inline edition of multiselection.
The domain parsers have been updated to support the multiselection fields. It uses by default the 'in' clause (which seem less astonishing) but '=' can also be used and use always list as value (no support for string which is quite technical).
I migrated also the stock_lot module to use it as there was a TODO (and ir provide a real testing usage).
And finally proteus is updated to have its own descriptor for Selection and MultiSelection.
msg47127 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-19.22:52:22
I think a MultiSelection field could be implemented as a JSON list from a selection (options) like Selection.
The search could use the JSON operator when available like for Dict and fall back to just string operator.
The client multiselection widget should allow to use it with also the xxx2Many field.
The evaluation is a list of string.
msg46745 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-05.19:00:09
For me, there is no point to continue on this path. I would prefer to see a MultiSelection field.
review56481002 updated at https://codereview.tryton.org/56481002/#ps140001
msg46139 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-22.11:21:10
I have some doubt about this usefulness of this type. Many database does not support Array.
Most of the case can be solved differently:

- Many2One: it is xxx2Many
- string: it is a kind of MultiSelection
- others: it is a kind of One2Many with a special widget to edit only one value. It could be the list-form (https://discuss.tryton.org/t/forms-in-listview/1053)
review56481002 updated at https://codereview.tryton.org/56481002/#ps120001
review56481002 updated at https://codereview.tryton.org/56481002/#ps100001
review56481002 updated at https://codereview.tryton.org/56481002/#ps80001
review56481002 updated at https://codereview.tryton.org/56481002/#ps40001
review56481002 updated at https://codereview.tryton.org/56481002/#ps20001
New review56481002 at https://codereview.tryton.org/56481002/#ps1
msg44840 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-11-11.21:36:21
As discussed in https://codereview.tryton.org/49501002/#msg5
History
Date User Action Args
2019-09-20 11:33:34roundup-botsetmessages: + msg51956
2019-09-20 11:33:32roundup-botsetmessages: + msg51955
2019-09-20 11:33:30roundup-botsetmessages: + msg51954
2019-09-20 11:33:28roundup-botsetmessages: + msg51953
2019-09-20 11:33:25roundup-botsetmessages: + msg51952
2019-09-20 11:33:20roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg51951
2019-09-19 19:18:01reviewbotsetmessages: + msg51946
2019-09-19 17:49:48reviewbotsetmessages: + msg51938
2019-09-04 18:04:20reviewbotsetmessages: + msg51654
2019-09-04 17:48:46cedsetstatus: in-progress -> testing
reviews: 56481002 -> 56481002,249911002
component: + proteus, stock_lot
messages: + msg51652

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