From 3d1dd15a3b635beea6987f1f1ce25e25992b92ba Mon Sep 17 00:00:00 2001 From: ced <> Date: Tue, 12 Dec 2006 08:55:10 +0000 Subject: [PATCH] Fix slash in pychart bzr revid: ced-5c8f972b643c254e39da5beefb0736a2a84f2c01 --- addons/productivity_analysis/report/productivity_analysis.py | 2 +- addons/project/report/gantt.py | 4 ++++ addons/stock/report/stock_graph.py | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/productivity_analysis/report/productivity_analysis.py b/addons/productivity_analysis/report/productivity_analysis.py index 6c00d9388f6..0e5de7e764d 100644 --- a/addons/productivity_analysis/report/productivity_analysis.py +++ b/addons/productivity_analysis/report/productivity_analysis.py @@ -138,7 +138,7 @@ class report_custom(report_int): f = fill_style.Plain() f.bgcolor = colors[user_id] - ar.add_plot(bar_plot.T(label=users_name.get(user,'Unknown'), data=data, hcol=user_id+1, cluster=(user_id, len(datas['users_id'])), fill_style=f )) + ar.add_plot(bar_plot.T(label=users_name.get(user,'Unknown').replace('/', '//'), data=data, hcol=user_id+1, cluster=(user_id, len(datas['users_id'])), fill_style=f )) ar.draw(can) can.close() diff --git a/addons/project/report/gantt.py b/addons/project/report/gantt.py index 969bec9cfed..3f92593d8eb 100644 --- a/addons/project/report/gantt.py +++ b/addons/project/report/gantt.py @@ -17,6 +17,10 @@ class GanttCanvas(object): self._max = 0 def add(self, user, name, datas): + if hasattr(user, 'replace'): + user=user.replace('/', '//') + if hasattr(name, 'replace'): + name=name.replace('/', '//') if user not in self._datas: self._datas[user] = [] for f in datas: diff --git a/addons/stock/report/stock_graph.py b/addons/stock/report/stock_graph.py index 77a336c5867..b713a8063aa 100644 --- a/addons/stock/report/stock_graph.py +++ b/addons/stock/report/stock_graph.py @@ -17,6 +17,8 @@ class stock_graph(object): self.val_max = '' def add(self, product_id, product_name, datas): + if hasattr(product_name, 'replace'): + product_name=product_name.replace('/', '//') if product_id not in self._datas: self._datas[product_id] = {} self._names[product_id] = product_name