From c38dfe59f6ffc0c9252f28d75ffb7460007ce7e5 Mon Sep 17 00:00:00 2001 From: Jay Vora Date: Tue, 14 Oct 2008 10:50:37 +0530 Subject: [PATCH] RenderPM will only work on updated Reportlab,commented bzr revid: jvo@tinyerp.com-20081014052037-mlswuotvebzii4vk --- addons/.project | 17 ----------------- addons/account_report/report/print_indicator.py | 8 +++++--- .../account_report/report/print_indicator.rml | 2 +- 3 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 addons/.project diff --git a/addons/.project b/addons/.project deleted file mode 100644 index 6b6fa8f2cfc..00000000000 --- a/addons/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - openobject-addons - - - - - - org.python.pydev.PyDevBuilder - - - - - - org.python.pydev.pythonNature - - diff --git a/addons/account_report/report/print_indicator.py b/addons/account_report/report/print_indicator.py index e26f179cd6e..51a0a905e10 100644 --- a/addons/account_report/report/print_indicator.py +++ b/addons/account_report/report/print_indicator.py @@ -36,7 +36,8 @@ from report.interface import report_int from reportlab.graphics.shapes import Drawing from reportlab.graphics.charts.barcharts import VerticalBarChart import reportlab.lib.colors -from reportlab.graphics import renderPM +#from reportlab.graphics import renderPM +import tools class accounting_report1(report_sxw.rml_parse): @@ -53,7 +54,7 @@ class accounting_report1(report_sxw.rml_parse): drawing = Drawing(400, 200) data = [ (13, 5, 20, 22, 37, 45, 19, 4), - (11, 3, 10, 22, 30, 25, 29, 6), + (15, 13, 4, 22, 30, 25, 29, 6), ] bc = VerticalBarChart() bc.x = 50 @@ -72,7 +73,8 @@ class accounting_report1(report_sxw.rml_parse): bc.categoryAxis.categoryNames = ['Jan-99','Feb-99','Mar-99', 'Apr-99','May-99','Jun-99','Jul-99','Aug-99'] drawing.add(bc) - renderPM.drawToFile(drawing, 'example1.jpg','jpg') + drawing.save(formats=['png'],fnRoot=tools.config['root_path']+"/Image",title="helo") +# renderPM.drawToFile(drawing, 'example1.jpg','jpg') return True diff --git a/addons/account_report/report/print_indicator.rml b/addons/account_report/report/print_indicator.rml index 41b025cc115..f3682148ce8 100644 --- a/addons/account_report/report/print_indicator.rml +++ b/addons/account_report/report/print_indicator.rml @@ -128,7 +128,7 @@ - +