← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~therp-nl/ocb-server/7.0_lp1260743_print_empty_lines into lp:ocb-server

 

Ronald Portier (Therp) has proposed merging lp:~therp-nl/ocb-server/7.0_lp1260743_print_empty_lines into lp:ocb-server.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1260743 in OpenERP Community Backports (Server): "Empty lines in layout of payment reminders are not printed"
  https://bugs.launchpad.net/ocb-server/+bug/1260743

For more details, see:
https://code.launchpad.net/~therp-nl/ocb-server/7.0_lp1260743_print_empty_lines/+merge/199108

Fixes lp1260743: empty lines are not printed.
-- 
https://code.launchpad.net/~therp-nl/ocb-server/7.0_lp1260743_print_empty_lines/+merge/199108
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:~therp-nl/ocb-server/7.0_lp1260743_print_empty_lines into lp:ocb-server.
=== modified file 'openerp/report/render/rml2pdf/trml2pdf.py'
--- openerp/report/render/rml2pdf/trml2pdf.py	2013-11-20 15:12:37 +0000
+++ openerp/report/render/rml2pdf/trml2pdf.py	2013-12-16 12:45:06 +0000
@@ -734,7 +734,9 @@
             posy += 1
 
         if node.get('colWidths'):
-            assert length == len(node.get('colWidths').split(','))
+            cw_text = node.get('colWidths')
+            assert length == len(node.get('colWidths').split(',')), (
+                'Wrong number of columns in %s' % cw_text)
             colwidths = [utils.unit_get(f.strip()) for f in node.get('colWidths').split(',')]
         if node.get('rowHeights'):
             rowheights = [utils.unit_get(f.strip()) for f in node.get('rowHeights').split(',')]
@@ -786,7 +788,7 @@
             keep_empty_lines = (len(textuals) > 1) and len(node.text.strip())
             for i in textuals:
                 if keep_empty_lines and len(i.strip()) == 0:
-                    i = '<font color="white"> </font>'
+                    i = '<font color="white">&nbsp;</font>'
                 result.append(platypus.Paragraph(i, style, **(utils.attr_get(node, [], {'bulletText':'str'}))))
             return result
         elif node.tag=='barCode':


Follow ups