bug fix :

1. now it will print title of the report where pagegraphic tag not used
2. report title now also print on the report in menu

bzr revid: bhumi195@gmail.com-20081115061455-ckmw8whckz0lpcrp
This commit is contained in:
bhumi195 2008-11-15 11:44:55 +05:30
parent 6c92455cd7
commit ec3fba4e2f
2 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
@ -769,7 +769,8 @@ class _rml_template(object):
drw = _rml_draw(gr[0], self.doc, images=images, path=self.path, title=self.title)
self.page_templates.append( platypus.PageTemplate(frames=frames, onPage=drw.render, **utils.attr_get(pt, [], {'id':'str'}) ))
else:
self.page_templates.append( platypus.PageTemplate(frames=frames, **utils.attr_get(pt, [], {'id':'str'}) ))
drw = _rml_draw(node,self.doc,title=self.title)
self.page_templates.append( platypus.PageTemplate(frames=frames,onPage=drw.render, **utils.attr_get(pt, [], {'id':'str'}) ))
self.doc_tmpl.addPageTemplates(self.page_templates)
def render(self, node_stories):

View File

@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
@ -579,6 +579,13 @@ class report_sxw(report_rml):
rml = report_xml.report_rml_content
report_type = report_xml.report_type
else:
ir_menu_report_obj = pool.get('ir.ui.menu')
report_menu_ids = ir_menu_report_obj.search(cr, uid,
[('id', '=', ids)], context=context)
if report_menu_ids:
report_name = ir_menu_report_obj.browse(cr, uid, report_menu_ids[0],
context=context)
title = report_name.name
rml = tools.file_open(self.tmpl, subdir=None).read()
report_type= data.get('report_type', report_type)