[FIX] format_value: when formating to date, make sure not converting from a datetime string as would make timezones apply and lead to a possible day change
bzr revid: mat@openerp.com-20140121132725-k9f8hna3lg7nq7g8
This commit is contained in:
@@ -191,6 +191,9 @@ instance.web.format_value = function (value, descriptor, value_if_empty) {
|
||||
+ ' ' + normalize_format(l10n.time_format));
|
||||
case 'date':
|
||||
if (typeof(value) == "string")
|
||||
if (value.length > 10)
|
||||
// in case value is a datetime, strip to avoid time manipulation
|
||||
value = value.substring(0,10);
|
||||
value = instance.web.auto_str_to_date(value);
|
||||
return value.toString(normalize_format(l10n.date_format));
|
||||
case 'time':
|
||||
|
||||
Reference in New Issue
Block a user