Newlines in notes field not displayed in pdf reports

Bug #803744 reported by Alan Lord
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Aeroo Reporting library
Confirmed
Low
sraps (Alistek)

Bug Description

Create a few lines of short text (with newlines) in a notes field of, for example, a sales.order object.

Create a simple Aeroo template (ODT) that displays the output in PDF.

The PDF output of the content of the notes field is displayed on a single line.

Revision history for this message
sraps (Alistek) (erpsraps) wrote :

Some remarks:
* this is not connected with PDF conversion problem persists in odt documents as well;
* newlines in notes fields and other multi-line text content generally works fine;
* the problem occurs with in-place formatting without using styles, like setting bold to the particular text content, OOo then places additional <text:span ...> tag around the content, which Aeroo does not understand.

This will be fixed in later versions of Aeroo RL.

Changed in aeroolib:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → sraps (Alistek) (erpsraps)
Revision history for this message
Réal Carbonneau (real-carbonneau) wrote :

Hi, I just wanted to report that with the most recent version of Aeroo 6.0.1.0, newlines in OpenERP note fields get converted to [f960362d7b9b141daa538c837c990dad]. Since many OpenERP documents have note fields which are often intended to be printed on forms, such as quotations, orders, invoices etc. and since newlines are very common in Notes, this would seem to be a bug that probably affects alot of installation.

Here is the example output of the following notes entered in an invoice:
test1
test2

Aeroo Output:
test1[f960362d7b9b141daa538c837c990dad]test2

A simple temporary workaround I can propose is to use a replace such as:
<o.comment.replace('\n',', ')>

However it would be nice someone knew exactly what characters or codes need to be sent to get an actual new line or new paragraph in the OpenOffice output, so that this workaround could be improved while waiting for a fix.

Revision history for this message
mathias123 (matze251284) wrote :

Hi,

i have the same problem here: i have a note field in the module sale.order ("<o.note>")

in OpenERP it looks like:
"first line
second line"

the PDF looks like:
"first linesecond line"

It is the same problem as in the comments above.

I can not confirm this statement from sraps:
* newlines in notes fields and other multi-line text content generally works fine;

can you please give me a hint, how i can handle the issue with the linebreaks?

best regards
mat

Revision history for this message
Russell Briggs (russell-briggs) wrote :

Hi Guys

Just to let you know that I've come upon this problem again recently, however I am happy to confirm that it is fixed in the latest version of 'aeroolib'

You must remember to INSTALL the latest aeroolib on your system,

i.e. It is not enough just to update the code from BZR, you must run 'python setup.py install' from within the aeroolib folder to install the latest code into you python 'site-packages' folder.

Thanks again to the awesome folks at Alistek for producing such a high-quality reports package! :)

Regards,

Russell Briggs
Junari Ltd

Revision history for this message
mathias123 (matze251284) wrote :

Hi Russel,

we re-installed our OpenERP yesterday with the newest versions of all packages. Unfortunately we see the same problem...

the field "line.notes" is printed with linebreaks:
"line 1
line 2"

the field "o.note" is printed without linebreaks:
"line 1line 2"

I hope you can help me...

Best regards
Mat

Revision history for this message
mathias123 (matze251284) wrote :

i think i found the problem:

it might be a bug inside open-office. It kind of depends on formatting rules of the text. i have some documents where the "o.note"-field works and some where it doesn't. copy and paste between the different templates works fine for me...

Revision history for this message
sraps (Alistek) (erpsraps) wrote :

Hi,
I have not closed this yet, due to several complex problems behind this, some of which is solved - where some, needs twaking.

@mathias123:

Could you attach the templates which gives you the error?

Revision history for this message
Stephane SALAH (stephanesalah) wrote :

I have find a solution to display line and carriage return.

so for example on o.note (sale.order)

this is my solution :
<for each="nl in o.note.split('\n') or []">
<nl>
</for>

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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