[FIX] ir.qweb: avoid errors with function fields of type datetime

bzr revid: odo@openerp.com-20140401160623-loj5nsph7tfnn1us
This commit is contained in:
Olivier Dony 2014-04-01 18:06:23 +02:00
parent b5c0c3a5d2
commit f120d6ffb7
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ class DateTime(orm.AbstractModel):
value = datetime.datetime.strptime(
value, DEFAULT_SERVER_DATETIME_FORMAT)
if value:
value = column.context_timestamp(
value = fields.datetime.context_timestamp(
cr, uid, timestamp=value, context=context)
value = value.strftime(openerp.tools.DEFAULT_SERVER_DATETIME_FORMAT)