Odoo Help

1

RML no more text output after setTag('para','image' ...

By
herbert6453
on 5/22/13, 11:20 AM 2,534 views

I use this code:

<?xml version="1.0"?>
<document filename="test.pdf">
  <template pageSize="(595.0,842.0)" title="Test" author="... " allowSplitting="20">
    <pageTemplate id="first">
      <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/>
    </pageTemplate>
  </template>
  <stylesheet>
    <blockTableStyle id="Standard_Outline">
....
    <story>
        <para>
            [[ company.logo and setTag('para','image',{'width':'100','height':'100'}) ]][[ company.logo ]]
        </para>
        <para>
            [[ company.logo and setTag('para','image',{'width':'100','height':'100'}) ]][[ company.logo ]]
        </para>
        <para>test output</para>
    </story>
    </document>

The pdf file contains 2 pictures, but not the text "test output".

log file content: (no errors or warnings)

2013-05-24 12:50:04,466 3635 INFO db1 werkzeug: 127.0.0.1 - - [24/May/2013 12:50:04] "POST /web/action/load HTTP/1.1" 200 -
2013-05-24 12:50:07,210 3635 DEBUG ? openerp.report.render.rml2pdf.trml2pdf: Image is 239x58
2013-05-24 12:50:07,816 3635 INFO None werkzeug: 127.0.0.1 - - [24/May/2013 12:50:07] "POST /web/report HTTP/1.1" 200 -

Please give the complete RML, and the last 40 lines of your log file.

patrick
on 5/23/13, 4:18 AM
0
patrick
On 5/23/13, 4:18 AM

Have you checked the log file? Usually missing output on the report means that Python encountered an error. This should be logged.

On linux (Ubuntu), the log file can be found at /var/log/openerp/openerp-server.log

So the steps to take are:

  • Print file, using the button
  • When the popup comes to open the PDF, go to the log file and check for any errors in the last 20 - 40 lines. Usually this gives enough information to fix the issue.

It might be useful to get the complete RML, because there might be dependencies in it.

update Are you sure that the images are not printed OVER the text? Try printing the text first, than the images.

Or replace the images with a very small image, so you can see the text if the images are printed over the text.....

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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 5/22/13, 11:20 AM
Seen: 2534 times
Last updated: 3/16/15, 8:10 AM