[IMP] ir_qweb: allow to display a datetime like a date

This commit is contained in:
Jeremy Kersten 2014-10-02 13:22:39 +02:00
parent 5175cc34e3
commit cefc9ad8e3
1 changed files with 4 additions and 1 deletions

View File

@ -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'):