core (XMLUI): fixed labels management for lists in _dataFormField2XMLUIData

This commit is contained in:
Goffi 2014-02-04 18:32:46 +01:00
commit 54f9e557e1

View file

@ -53,7 +53,7 @@ def _dataFormField2XMLUIData(field):
elif field.fieldType == 'list-single':
widget_type = "list"
del widget_args[0]
widget_kwargs["options"] = [option.value for option in field.options]
widget_kwargs["options"] = [(option.value, option.label or option.value) for option in field.options]
else:
error(u"FIXME FIXME FIXME: Type [%s] is not managed yet by SàT" % field.fieldType)
widget_type = "string"