[IMP] ir_qweb: remove the option 'only_date' introducted in cefc9ad8e3. Now we can use widget='date' to do the same thing. That keeps the same behaviour that in the backend.

<span t-field=model.datetime_field t-field-options="{'widget': 'date'}"/>
This commit is contained in:
Jeremy Kersten
2014-10-15 13:56:01 +02:00
parent f34ea0bc54
commit 1d0c30e010
+2 -2
View File
@@ -641,13 +641,13 @@ class DateConverter(osv.AbstractModel):
_inherit = 'ir.qweb.field'
def value_to_html(self, cr, uid, value, column, options=None, context=None):
if not value: return ''
if not value or len(value)<10: return ''
lang = self.user_lang(cr, uid, context=context)
locale = babel.Locale.parse(lang.code)
if isinstance(value, basestring):
value = datetime.datetime.strptime(
value, openerp.tools.DEFAULT_SERVER_DATE_FORMAT)
value[:10], openerp.tools.DEFAULT_SERVER_DATE_FORMAT)
if options and 'format' in options:
pattern = options['format']