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 can i use <storyPlace> element in RML on OpenERP7?

rml
By
Panida
on 5/20/14, 10:23 AM 996 views

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?

1

Axel Mendoza

--Axel Mendoza--
10318
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 12/31/14, 1:15 AM

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!!

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

3 follower(s)

Stats

Asked: 5/20/14, 10:23 AM
Seen: 996 times
Last updated: 8/3/15, 4:54 PM