7.0 trunk pdf report generation fails when company uses all address lines

Bug #1085027 reported by Eckhard Schwarzat
48
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

How to replicate:

Settings > Companies > Companies 'General Info'

Enter a company address which uses all address lines (first and second line).

click on the 'Preview Header / Footer' button.

Result: pdf generation fails with error message (window pop-up) '... not enough space'.

This makes it impossible to generate any pdf report (for instance print a sales order).

Fix:

Settings > Companies > Companies 'Header / Footer'

Change to the RML code:
-------
RML Header
...
  <!-- page header -->
            <lines>1.3cm 27.7cm 20cm 27.7cm</lines>
            <drawRightString x="20cm" y="27.8cm">[[ company.rml_header1 ]]</drawRightString>
            <drawString x="1.3cm" y="27.4cm">[[ company.partner_id.name ]]</drawString>
            <place x="1.3cm" y="24.8cm" height="2.55cm" width="15.0cm">
                <para style="main_header">[[ display_address(company.partner_id) or '' ]]</para>
            </place>
            <drawString x="1.3cm" y="25.0cm">Phone:</drawString>
            <drawRightString x="7cm" y="25.0cm">[[ company.partner_id.phone or '' ]]</drawRightString>
            <drawString x="1.3cm" y="24.6cm">Mail:</drawString>
            <drawRightString x="7cm" y="24.6cm">[[ company.partner_id.email or '' ]]</drawRightString>
            <lines>1.3cm 24.5cm 7cm 24.5cm</lines>
....
------

error is provoked as long as <place x="1.3cm" y="25.8cm" height="1.55cm" width="15.0cm">
the height attribute is set to 1.55cm.

The additional y position changes were necessary to avoid 'line within line printing'

Best Regards,
Eckhard Schwarzat.

Tags: 7.0 trunk
Amit Parik (amit-parik)
affects: openobject-addons → openobject-server
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Alan Lord (theopensourcerer) wrote :

Am also seeing this on today's trunk. And in my Company details I am not using the second address line; it is empty.

Revision history for this message
Alan Lord (theopensourcerer) wrote :

The error report is rather unhelpful. I assumed that initially it was to with RAM, not physical space in the template.

Modifying the layout to suit the logo etc. fixes the problem, but I think this bug is more about an unhelpful error or suggestions on how to adjust the template header.

Revision history for this message
Graham S (graham-s) wrote :

This bug is over a year old and is still there in the latest release 7.0 downloaded yesterday from launchpad. Surely this bug effects everyone and who tries to generate a quote/order/invoice and wants to include their correct address why is it a low priority invoicing is funamental

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.