Odoo Help
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
|
etc.
How can i use <storyPlace> element in RML on OpenERP7?
I tried to use the storyPlace element in RML. But when I used it in OpenERP it did not work.
This is my code:
<story>
<storyPlace x="1cm" y="0cm" width="10cm" height="1cm" origin="page">
<para>Text inside storyPlace</para>
</storyPlace>
<para>Text outside storyPlace</para>
</story>
The text inside storyPlace not be displayed. but the text outside storyPlace can be displayed as normal. How can I make storyPlace work?
You can't use it, I have the same situation today and looking at OpenERP source code the tag storyPlace is not implemented maybe because reportlab platyplus doesn't provide support for this and I couldn't find any reference for this tag in the reportlab source code. The only reference about this is in the reportlab docs. I saw that an alternative reportlab implementation called z3c already have support for this tag.
The solution that I use is the place tag inside pageGraphics in pageTemplate. This let me put an blockTable at a given position. For example my pageTemplate looks like this:
<pageTemplate id="main1">
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
<pageGraphics>
<drawCentredString x="10.5cm" y="0.8cm">Página <pageNumber/> de <pageCount/></drawCentredString>
<place x="3cm" y="5cm" width="530.0" height="205.0">
<blockTable colWidths="235,235" style="Table_Heading">
<tr>
<td>
<para style="PT">[[ get_value_in_words(objects[0].amount_total) ]]</para>
</td>
<td>
<para style="PTR">[[objects[0].amount_untaxed]] </para>
</td>
</tr>
<tr>
<td>
<para style="P7">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P7">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P7">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P7">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P7">
<font color="white"> </font>
</para>
</td>
<td>
<para style="PTR">[[ objects[0].amount_total ]] </para>
</td>
</tr>
</blockTable>
</place>
</pageGraphics>
</pageTemplate>
Hope this helps!!
About This Community
This platform 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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 5/20/14, 10:23 AM |
Seen: 1403 times |
Last updated: 8/3/15, 4:54 PM |