Merge lp:~olivier-laurent/openobject-server/6.1-bug1157048 into lp:openobject-server/6.1

Proposed by Olivier Laurent (Acsone)
Status: Needs review
Proposed branch: lp:~olivier-laurent/openobject-server/6.1-bug1157048
Merge into: lp:openobject-server/6.1
Diff against target: 16 lines (+5/-1)
1 file modified
openerp/report/render/rml2pdf/trml2pdf.py (+5/-1)
To merge this branch: bzr merge lp:~olivier-laurent/openobject-server/6.1-bug1157048
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+154026@code.launchpad.net

Description of the change

The change is similar to:
- lp:~openerp-dev/openobject-server/trunk-opw-576860-port-kbh
- lp:~acl-openerp/openobject-server/6.1-opw-576860-acl
- lp:~openerp-dev/openobject-server/7.0-opw-587565-nep

But it avoids the side effect consisting to produce a blank line on each "technical" empty paragraph found in the rml template itself. Only blank lines coming from user data are taken into account.

To post a comment you must log in.

Unmerged revisions

4067. By Olivier Laurent (Acsone)

FIX: Do not remove empty lines in the pdf result of a rml report

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openerp/report/render/rml2pdf/trml2pdf.py'
--- openerp/report/render/rml2pdf/trml2pdf.py 2012-07-16 07:52:17 +0000
+++ openerp/report/render/rml2pdf/trml2pdf.py 2013-03-19 10:17:10 +0000
@@ -742,7 +742,11 @@
742 if extra_style:742 if extra_style:
743 style.__dict__.update(extra_style)743 style.__dict__.update(extra_style)
744 result = []744 result = []
745 for i in self._textual(node).split('\n'):745 textuals = self._textual(node).split('\n')
746 keep_empty_lines = (len(textuals) > 1) and len(node.text.strip())
747 for i in textuals:
748 if keep_empty_lines and len(i.strip()) == 0:
749 i = '<font color="white"> </font>'
746 result.append(platypus.Paragraph(i, style, **(utils.attr_get(node, [], {'bulletText':'str'}))))750 result.append(platypus.Paragraph(i, style, **(utils.attr_get(node, [], {'bulletText':'str'}))))
747 return result751 return result
748 elif node.tag=='barCode':752 elif node.tag=='barCode':