parse_value: interger != float
Wwhen parsing a integer field, do not accept float values. '1' or '1.0' is ok but not '1.1'. (opw 608544)
This commit is contained in:
parent
4d3a5df001
commit
0b4921e4d6
|
@ -228,7 +228,8 @@ instance.web.parse_value = function (value, descriptor, value_if_empty) {
|
|||
value = value.replace(instance.web._t.database.parameters.thousands_sep, "");
|
||||
} while(tmp !== value);
|
||||
tmp = Number(value);
|
||||
if (isNaN(tmp))
|
||||
// do not accept not numbers or float values
|
||||
if (isNaN(tmp) || tmp % 1)
|
||||
throw new Error(_.str.sprintf(_t("'%s' is not a correct integer"), value));
|
||||
return tmp;
|
||||
case 'float':
|
||||
|
|
Loading…
Reference in New Issue