[FIX] Make progress bar (format.js) more tolerant with falsy floats

bzr revid: fme@openerp.com-20120307095700-i5msqipgij4v36fl
This commit is contained in:
Fabien Meghazi 2012-03-07 10:57:00 +01:00
parent 3eea299e73
commit cdd72c0fe6
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ openerp.web.format_cell = function (row_data, column, options) {
case 'progressbar':
return _.template(
'<progress value="<%-value%>" max="100"><%-value%>%</progress>', {
value: _.str.sprintf("%.0f", row_data[column.id].value)
value: _.str.sprintf("%.0f", row_data[column.id].value || 0)
});
}