[ADD] fallback float_time parsing on float parsing if the value does not match float_time's format

bzr revid: xmo@openerp.com-20111110133100-sp4ttbfy90cz9kjq
This commit is contained in:
Xavier Morel 2011-11-10 14:31:00 +01:00
parent f05f913016
commit abf6f08df0
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ openerp.web.parse_value = function (value, descriptor, value_if_empty) {
case 'float_time':
var float_time_pair = value.split(":");
if (float_time_pair.length != 2)
throw new Error(value + " is not a correct float_time");
return openerp.web.parse_value(value, {type: "float"});
var hours = openerp.web.parse_value(float_time_pair[0], {type: "integer"});
var minutes = openerp.web.parse_value(float_time_pair[1], {type: "integer"});
return hours + (minutes / 60);