[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:
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user