[FIX] corrects stupid bug with previous commit, where empty cells were colored in heatmap mode (addon web_graph)

bzr revid: ged@openerp.com-20131127144706-w7amtjnnku214yih
This commit is contained in:
Gery Debongnie 2013-11-27 15:47:06 +01:00
parent 574253bb63
commit c17791dd82
1 changed files with 3 additions and 2 deletions

View File

@ -349,9 +349,10 @@ instance.web_graph.GraphView = instance.web.View.extend({
function make_cell (value) {
var color,
cell = $('<td></td>');
if (value !== undefined) {
cell.append(value);
if (value === undefined) {
return cell;
}
cell.append(value);
if ((self.mode === 'pivot') && (row.is_expanded) && (row.path.length <=2)) {
color = row.path.length * 5 + 240;
cell.css('background-color', $.Color(color, color, color));