From ef011d650a698246992f31dd79daf703e68fd403 Mon Sep 17 00:00:00 2001
From: "hda@tinyerp.com" <>
Date: Mon, 20 Oct 2008 15:21:21 +0530
Subject: [PATCH 1/2] bugfix:temp for supplier invoice + menuitem of charts
(ref:jvo)
bzr revid: hda@tinyerp.com-20081020095121-365pw3p1quzryxbr
---
addons/account/account_invoice_view.xml | 2 +-
addons/account/project/project_view.xml | 2 +-
addons/account/security/account_security.xml | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 1f76270ee4e..0e1949f9554 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -149,7 +149,7 @@
-
+
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index ccc8fb420e7..74ce6a354e9 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -91,7 +91,7 @@
+ parent="account_analytic_def_account"/>
diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml
index e712c1b5c6d..7f441b1b551 100644
--- a/addons/account/security/account_security.xml
+++ b/addons/account/security/account_security.xml
@@ -32,8 +32,8 @@
-
From 362d542b8eefac93c1492fc927429193680d8e8d Mon Sep 17 00:00:00 2001
From: Jay Vora
Date: Mon, 20 Oct 2008 16:13:35 +0530
Subject: [PATCH 2/2] Account_report:Modified indicators report
bzr revid: jvo@tinyerp.com-20081020104335-rmu9u4k12vnmfh4x
---
.../account_report/report/print_indicator.py | 32 ++++++++++---------
.../account_report/report/print_indicator.rml | 1 -
.../wizard/wizard_print_indicators.py | 4 +--
3 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/addons/account_report/report/print_indicator.py b/addons/account_report/report/print_indicator.py
index 800878ea198..2fc73c68649 100644
--- a/addons/account_report/report/print_indicator.py
+++ b/addons/account_report/report/print_indicator.py
@@ -126,18 +126,19 @@ class accounting_report_indicator(report_sxw.rml_parse):
def lines(self,data):
res={}
result=[]
- obj_inds=self.pool.get('account.report.report').browse(self.cr,self.uid,data['indicator_id'])
+ ind_ids=self.pool.get('account.report.report').search(self.cr,self.uid,[])
+ obj_inds=self.pool.get('account.report.report').browse(self.cr,self.uid,ind_ids)
- def find_child(obj):
- self.list.append(obj)
- if obj.child_ids:
- for child in obj.child_ids:
- find_child(child)
- return True
+# def find_child(obj):
+# self.list.append(obj)
+# if obj.child_ids:
+# for child in obj.child_ids:
+# find_child(child)
+# return True
+#
+# find_child(obj_inds)
- find_child(obj_inds)
-
- for obj_ind in self.list:
+ for obj_ind in obj_inds:
res = {
'id':obj_ind.id,
'name':obj_ind.name,
@@ -146,10 +147,8 @@ class accounting_report_indicator(report_sxw.rml_parse):
'disp_graph':obj_ind.disp_graph,
'note':obj_ind.note,
'type':obj_ind.type,
- 'last':False,
}
result.append(res)
- result[-1]['last']=True
return result
def getarray(self,data,object):
@@ -165,7 +164,7 @@ class accounting_report_indicator(report_sxw.rml_parse):
def test1(self,data,object,intercall=False):
- path=tools.config['root_path']+"/Temp_images/Image"
+
obj_history=self.pool.get('account.report.history')
if data['select_base']=='year':
@@ -235,8 +234,11 @@ class accounting_report_indicator(report_sxw.rml_parse):
# renderPM.drawToFile(drawing1, 'example1.jpg','jpg')
import os
dirname ='Temp_images'
- if not os.path.isdir('./' + dirname + '/'):
- os.mkdir('./' + dirname + '/')
+ path=os.path.join(tools.config['root_path'],dirname,"Image")
+
+ if not os.path.isdir(tools.config['root_path']+ "/"+dirname + '/'):
+ os.mkdir(tools.config['root_path'] +"/"+ dirname + '/')
+ os.path.join(tools.config['root_path'],dirname,"/")
can = canvas.init('Image'+str(self.count)+".png")
# can.clip(0,0,600,400)
diff --git a/addons/account_report/report/print_indicator.rml b/addons/account_report/report/print_indicator.rml
index b535a277fca..7e66c37452c 100644
--- a/addons/account_report/report/print_indicator.rml
+++ b/addons/account_report/report/print_indicator.rml
@@ -171,7 +171,6 @@
-[[ o['last'] and removeParentNode('para')]][[ '='*92 ]]
diff --git a/addons/account_report/wizard/wizard_print_indicators.py b/addons/account_report/wizard/wizard_print_indicators.py
index 2870c29e61c..b781073ddf4 100644
--- a/addons/account_report/wizard/wizard_print_indicators.py
+++ b/addons/account_report/wizard/wizard_print_indicators.py
@@ -33,12 +33,12 @@ import pooler
form = '''
'''
fields = {
- 'indicator_id': {'string':'Choose Indicator', 'type':'many2one', 'relation': 'account.report.report','required':True,},
'select_base': {'string':'Choose Criteria', 'type':'selection','selection':[('year','Based On Fiscal Years'),('periods','Based on Fiscal Periods')],'required':True,},
}