[IMP] fields.Date[Time]: convert_to_cache: avoid costly parsing when not validating
authorOlivier Dony <odo@openerp.com>
Thu, 7 Aug 2014 10:56:13 +0000 (12:56 +0200)
committerOlivier Dony <odo@openerp.com>
Thu, 7 Aug 2014 16:24:29 +0000 (18:24 +0200)
commit4c8c7224014a1997c9896180922a6ef9f2eeca01
tree32ee48bd283439a8d3bb07d7ccf893f1da5cc7a2
parent2bbff57691a33a02ca6a85a600f0b32035daa2a4
[IMP] fields.Date[Time]: convert_to_cache: avoid costly parsing when not validating

The extra parsing check is not necessary when we're
not validating inputs, because in that case the
values come from the database and are valid.
The validation is quite expensive due to calls
to strptime() + strftime().
openerp/fields.py