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.

1

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

By
herbert6453
on 5/22/13, 11:20 AM 2,037 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

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
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.....

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

0 follower(s)

Stats

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