I have some Sales Order Lines that have long descriptions that require line breaks to be readable. I put line breaks into the description (description_sale field), but when I create a pdf to print/send these line breaks go away. Is there any way to force a line break to stay? Is this an issue with rmltopdf, or can I solve it in OpenERP?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi Alex,
You could try something like this:
<td>
<section>
<para style="terp_default">[[ repeatIn(line.name and line.name.split('\n') or [],'desc_line') ]]</para>
<spacer length="10">[[ desc_line != '' and removeParentNode('spacer') ]]</spacer>
<para style="P3">[[ format(desc_line) or '' ]]</para>
</section>
</td>
Hope that this helps :)
Cheers,
Petar
I tried adding this code (and variations) but it caused the text to not render at all. Any idea why that might be? I thought repeatIn() only worked over records, can it be use on individual lines like this too?
To be honest, I don't have a clue why it's not working at your end. :( We're using this approach constantly in our projects. Maybe you could provide your code or something ...
Well not sure what my deal was last time, but I got it working today. Thanks for your help, I probably wouldn't have been able to figure that out on my own.
try <xpre> tag instead of <para> that respects spaces and line breaks.
<xpre color="black">[[ line.name or '' ]]</xpre>
Hi, the syntax was really helpful, I have applied for a Text field, In PDF it was able to display the spaces but the for description unable to display the complete text,can you please help me. EX: 1.Above material will be delivered within 4 day from date of issue of Order. 2.Payment will be made after delivery. 3.The above prices are inclusive of all taxes. 4.Statutory Levies and tax at source shall be deducted as per the prevailing acts. 5.HMRI reserves the right to cancel this Purchase Order at any point of time, if the services provided by the vendor are not upto the HMRI expectation or if any deviation is found from the vendor’s side on the terms and conditions mentioned in this Purchase Order. 6.Delivery of the item will be free of cost including its packing & forwarding charges. In case of 5 condition the content was displaying half only rest was not displaying????.Is there any alternative solution.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up