Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits:
6022eeab by Cédric Krier at 2022-12-28T10:41:52+01:00
Convert multiselection into selection for screen domain parser
When the selection of multiselection fields is a method, it must be converted
into a list like the selection fields.
Closes #11968
- - - - -
2 changed files:
- sao/src/screen.js
- tryton/tryton/gui/window/view_form/screen/screen.py
Changes:
=====================================
sao/src/screen.js
=====================================
@@ -1745,7 +1745,8 @@
for (var name in fields) {
var props = fields[name];
if ((props.type != 'selection') &&
- (props.type != 'reference')) {
+ (props.type != 'multiselection') &&
+ (props.type != 'reference')) {
continue;
}
if (props.selection instanceof Array) {
=====================================
tryton/tryton/gui/window/view_form/screen/screen.py
=====================================
@@ -190,7 +190,8 @@
fields = view_tree['fields'].copy()
for name in fields:
- if fields[name]['type'] not in ('selection', 'reference'):
+ if fields[name]['type'] not in {
+ 'selection', 'multiselection', 'reference'}:
continue
if isinstance(fields[name]['selection'], (tuple, list)):
continue
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/6022eeabc29f86185121f2da0563cadba1d70a4d
--
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/6022eeabc29f86185121f2da0563cadba1d70a4d
You're receiving this email because of your account on foss.heptapod.net.