[IMP] ir_qweb: allow to display only the time from a field datetime.

Can be usefull if we want to split date part (using widget:'date') and time part (new option)
This commit is contained in:
Jeremy Kersten
2017-02-24 08:51:26 +01:00
parent 6571597b42
commit 5b3d0b3bc8
+5 -1
View File
@@ -189,7 +189,11 @@ class DateTimeConverter(models.AbstractModel):
if options and 'format' in options:
pattern = options['format']
else:
strftime_pattern = (u"%s %s" % (lang.date_format, lang.time_format))
if options and options.get('time_only'):
strftime_pattern = (u"%s" % (lang.time_format))
else:
strftime_pattern = (u"%s %s" % (lang.date_format, lang.time_format))
pattern = posix_to_ldml(strftime_pattern, locale=locale)
if options and options.get('hide_seconds'):