Odoo Help


Can Frame boundaries be changed in SXW-RML reports?

on 5/16/13, 8:36 AM 5,343 views

I am trying to create a new SXW RML report in landscape format. I have been able to convert the RML to A4 landscape mode but I have some issues with a tables and page breaks.

I'd like the report to display 4 tables, all of them in one page. This is the draft of the report I am designing:

Image: www.solid-rock-it.com/web-solid-rock/blog/images/OpenERP/Captura.PNG

I would like the Table3 and Table4 to be rendered lower than in the draft. But the problem is that if I add a new line before the Table3 or Table4, the RML conversion creates a new page break, and the tables are rendered in a second page.

I think the problem has something to do with the frame size and its boundaries. As it can be seen in the previous image in which the boundaries are displayed, the bondaries are configured as if the page was in portrait mode instead of landscape. How can I change the boundaries to adapt them to landscape mode?

RML file:

<?xml version="1.0"?>
<document filename="test.pdf">
  <template pageSize="(842.0,595.0)" title="Test" author="Martin Simon" showBoundary="1" allowSplitting="20">
    <pageTemplate id="first">
      <frame id="first" x1="57.0" y1="57.0" width="728" height="481"/>


Hi Aitzol, can you please tell me which OpenERP version you are using? Make sure you are upto latest updates. Thanks

on 5/20/13, 6:52 AM

I am using openerp 6.1.1. Fortunately, I have been able to find a solution to the problem

on 7/11/13, 8:27 AM


| 4 4 8
Ahmedabad, India

Odoo Expert

On 5/16/13, 9:36 AM

Hi Aitzol, tables are not displayed properly because the report is A4 size in portrait. You just need to convert portrait document in landscape mode then it will be in proper order. First open your sxw file in there go to Format->Page menu there you can see Orientation:Landscape.

image description

You can also set page size from rml. Generally template pagesize is (842,595) for landscape report. You can also change in frame tag as per your need.

  <template pageSize="(842.0,595.0)" title="Test" author="Martin Simon" allowSplitting="20">
    <pageTemplate id="first">
      <frame id="first" x1="35.0" y1="35.0" width="772" height="525"/>
                //Your Company header

Thanks Keyur, The SXW report is already in landscape mode and the page layout in the PDF is a A4 in landscape format, as my previous image shows (notice the right margin). The problem is that the page boundaries remain as if it was in portrait mode.

on 5/16/13, 9:52 AM

The strangest thing is that the template's and frame's sizes are already configured for landscape mode. The boundaries however, remain to be in portrait mode. This is the RML:

<?xml version="1.0"?> <document filename="test.pdf"> <template pageSize="(842.0,595.0)" title="Test" author="Martin Simon" showBoundary="1" allowSplitting="20"> <pageTemplate id="first"> <frame id="first" x1="57.0" y1="57.0" width="728" height="481"/> </pageTemplate> </template>

Image of the PDF, still with wrong boundaries: http://www.solid-rock-it.com/web-solid-rock/blog/images/OpenERP/Captura2.PNG

on 5/20/13, 6:16 AM

Maybe because you are printing barcode report so that's why the report is not in actual width try to reduce the width of the barcode table then it might help. Thanks

on 5/20/13, 6:54 AM
On 7/11/13, 8:15 AM

I finally found the solution to the problem with the page landscape layout. The problem was that although the page was in landscape mode, the page frame remained in portrait mode.

I found that all dimensions in the rml were ok and the problem was somewhere else, in the report's python file to be precise:


The problem has been solved by adding "header=False" parameter to the report_sxw method call. It seems that by not adding this parameter, OpenERP modifies the page layout in order to add the header, which is configured to be in portrait mode. This was overwriting the settings for landscape mode in my RML file.

I have the same problem, I have OpenERP Online, do you know where can I find this file? Thanks

Luis Lozano
on 12/24/13, 2:16 PM

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.


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

2 follower(s)


Asked: 5/16/13, 8:36 AM
Seen: 5343 times
Last updated: 3/16/15, 8:10 AM