Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to make space in qweb report?

By
Mohammed Khamis
on 2/18/15, 4:22 AM 2,648 views

please help me how to make space in qweb report between two words?

Thank you so much

1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 2/18/15, 4:29 AM
  • Solution 1

<![CDATA[
&nbsp;
]]>

  • Solution 2, this hack

<t t-set="foo" t-value=" '     '.replace(' ',u'\xa0').encode('utf-8') "/>
<t t-esc="foo"/>

in this way you can replace all instances of spaces

<t t-set="foo" t-value="o.name.replace(' ',u'\xa0').encode('utf-8')"/>

 

Nothing beats CDATA :) Always works and its less heavy than the replace and encode, meaning slightly faster loading.

Yenthe
on 2/18/15, 4:37 AM

Yes, you're right... but only sometimes do not know where it should be :)

zbik
on 2/18/15, 4:57 AM

I vote for solution 2

John Chua
on 12/25/15, 7:25 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/18/15, 4:22 AM
Seen: 2648 times
Last updated: 3/16/15, 8:10 AM