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)
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.
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.