Report Engine : Continuous spaces are replaced by one space and '\n' disrespected.

Bug #483102 reported by Bruno Hostalery
44
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP's Framework R&D

Bug Description

Try to use space for separator in number in report.
When put in menu->administration->translate->terms->language-> french-> thousands separator a comma, it appears on report in type float.
When put space in place of comma, nothing appears on report.

sample :
with comma : 10,000.00
with space : 10000.00 in place of 10 000.00.

affects: openerp-france → openobject-server
Revision history for this message
Parthiv Patel (parthiv-patel-deactivatedaccount) wrote : Re: [Bug 483102] Re: no space separator in report

try with two white spaces....

On Wed, Jan 20, 2010 at 7:32 PM, Christophe (OpenERP) <
<email address hidden>> wrote:

> ** Project changed: openerp-france => openobject-server
>
> --
> no space separator in report
> https://bugs.launchpad.net/bugs/483102
> You received this bug notification because you are subscribed to
> OpenObject Server.
>
> Status in OpenObject Server: New
>
> Bug description:
> Try to use space for separator in number in report.
> When put in menu->administration->translate->terms->language-> french->
> thousands separator a comma, it appears on report in type float.
> When put space in place of comma, nothing appears on report.
>
> sample :
> with comma : 10,000.00
> with space : 10000.00 in place of 10 000.00.
>
>
>

--
Thanks & Regards,
Parthiv Patel

Revision history for this message
Bruno Hostalery (istf) wrote : Re: no space separator in report

Effectively, it's the right thing.
But not only two, also 3 or 4. It depends on what you put in format text

exemple with 1 500 000

if you put [3,3,-1] and only two spaces, it will show : 1500 000,00
if you put [3,3,-1] and three spaces, it will show : 1 500 000,00
if you put [] and as many space you want space, it will show 1500000,00

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello,

Even the text which has continuous spaces will be replaced by one space.

Changed in openobject-server:
status: New → Confirmed
summary: - no space separator in report
+ Report Engine : Continuous spaces are replaced by one space.
Revision history for this message
Dhara Shah (OpenERP) (dsh-openerp) wrote : Re: Report Engine : Continuous spaces are replaced by one space.

Hello,

If it is problem with white space only..use xpre tag instead of para tag of rml(in .rml file of report)..

The xpre tag preserves line breaks where they are placed in the text,white spaces and many more things
The drawback of xpre is ,it wont do text wrapping which para can do easily
eg:
1) <para>D s</para>
    O/P: D S
2) <xpre>D s</xpre>
    O/P: D s

Thanks,
Regards,

Revision history for this message
Dhara Shah (OpenERP) (dsh-openerp) wrote :

Hello,

Sorry ,white spaces are vanished here too

for "D S", para will print "D S" while xpre will print "D S"

Thanks,
Regards,

Revision history for this message
SeanBoran (sean-boran) wrote :

Hi

In a similar vein "blank lines are deleted":
When creating an Invoice (GTK GUI), if one adds text to the "Other Data" tab with blanks lines between some of the text, when printing out these empty lines are stripped out.

I find the empty lines useful to space out the text and thus make it easier to read.

In the "notes" of Detail Lines, blank lines are also stripped.

Version: 5.0.6. from bzr 20.1.2010

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

After doing some what R&D on reportLab platypus.Paragraph I found that this class itself is the culprit for replacing the spaces.

You can check /usr/share/pyshared/reportlab/platypus/paragraph.py line no 96 def _lineClean which is called from def cleanBlockQuotedText on line 99 and which inturn is called from __init__ of class Paragraph 's
self._setup(text, style, bulletText, frags, cleanBlockQuotedText) and in this function _setup the cleanBlockQuotedText is called.

Thanks

summary: - Report Engine : Continuous spaces are replaced by one space.
+ Report Engine : Continuous spaces are replaced by one space and '\n'
+ disrespected.
Changed in openobject-server:
importance: Undecided → Wishlist
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
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.