[IMP] ir_qweb: allow to display a datetime like a date
This commit is contained in:
parent
5175cc34e3
commit
cefc9ad8e3
|
@ -666,7 +666,10 @@ class DateTimeConverter(osv.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('only_date') and options.get('only_date') in ["True", 'true']:
|
||||
strftime_pattern = (u"%s" % (lang.date_format))
|
||||
else:
|
||||
strftime_pattern = (u"%s %s" % (lang.date_format, lang.time_format))
|
||||
pattern = openerp.tools.posix_to_ldml(strftime_pattern, locale=locale)
|
||||
|
||||
if options and options.get('hide_seconds'):
|
||||
|
|
Loading…
Reference in New Issue