[FIX] account: dashboard graph tooltip color

In the accounting graphs, the graph's color and tooltip didn't match
for linecharts. This commit fixes that.
This commit is contained in:
Denis Vermylen
2017-05-04 10:20:09 +02:00
parent 1682106f7d
commit c35c8c5476
@@ -4,6 +4,7 @@ from datetime import datetime, timedelta
from babel.dates import format_datetime, format_date
from odoo import models, api, _, fields
from odoo.release import version
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF
from odoo.tools.misc import formatLang
@@ -98,7 +99,8 @@ class account_journal(models.Model):
data.append({'x': short_name, 'y':last_balance, 'name': name})
[graph_title, graph_key] = self._graph_title_and_key()
return [{'values': data, 'title': graph_title, 'key': graph_key, 'area': True}]
color = '#875A7B' if '+e' in version else '#7c7bad'
return [{'values': data, 'title': graph_title, 'key': graph_key, 'area': True, 'color': color}]
@api.multi
def get_bar_graph_datas(self):