lims_interface: 'datetime' field type also needs format attribute

This commit is contained in:
Mario Puntin 2020-04-07 11:30:25 -03:00
parent e727d143a3
commit 5ec9ed9672
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ class Data(sequence_ordered(), ModelSQL, ModelView):
for model in Model.search([]):
selection.append((model.model, model.name))
res[field.name]['selection'] = selection
if field.type == 'timestamp':
if field.type in ['datetime', 'timestamp']:
res[field.name]['format'] = PYSONEncoder().encode(
'%H:%M:%S.%f')
return res