From 6408d275c2cab1213a85da56172cc7344aa69e2f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 10 Sep 2012 16:17:29 +0200 Subject: [PATCH] [IMP] res.company: support true multiline report footer using RML and bzr revid: odo@openerp.com-20120910141729-22sk7ca5himljqni --- openerp/addons/base/res/res_company.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/openerp/addons/base/res/res_company.py b/openerp/addons/base/res/res_company.py index 489deead29b..2bdd59a7d66 100644 --- a/openerp/addons/base/res/res_company.py +++ b/openerp/addons/base/res/res_company.py @@ -168,10 +168,6 @@ class res_company(osv.osv): self.write(cr, uid, [company.id], {'rml_footer': res}, context=context) return True - def _get_rml_footer_by_line(self, cr, uid, ids, rml_footer, line, context=None): - rml_footer_lines = (rml_footer or '').split('\n') - return rml_footer_lines[line] if line < len(rml_footer_lines) else '' - def on_change_country(self, cr, uid, ids, country_id, context=None): currency_id = self._get_euro(cr, uid, context=context) if country_id: @@ -304,6 +300,9 @@ class res_company(osv.osv):
+ + + [[ company.logo or removeParentNode('image') ]] @@ -332,10 +331,10 @@ class res_company(osv.osv): 1.2cm 2.65cm 19.9cm 2.65cm - [[ company._get_rml_footer_by_line(company.rml_footer,line=0) ]] - [[ company._get_rml_footer_by_line(company.rml_footer,line=1) ]] - [[ company._get_rml_footer_by_line(company.rml_footer,line=2) ]] - Contact : [[ user.name ]] - Page: + + [[ company.rml_footer ]] + Contact : [[ user.name ]] - Page: +
"""