Odoo Help


[SOLVED] How to turn a SXW file into a RML file?

Juan Formoso
on 10/30/14, 12:59 PM 951 views

I am trying to convert a SXW file into a RML file, using openerp_sxw2rml.py, but it is giving too errors and it is generating an empty RML file. I am sure that the content of the SXW is right, because I am using existing SXW files from the modules, to check if they are being transformed in a right way.

I copied the account_balance.sxw from the account module, and pasted it into openerp_sxw2rml folder to test it. Then I executed this:

sudo ./openerp_sxw2rml.py /opt/openerp7/addons/base_report_designer/openerp_sxw2rml/account_balance.sxw > /opt/openerp7/addons/base_report_designer/openerp_sxw2rml/account_balance.rml

And the result is the next:

./openerp_sxw2rml.py: 30: ./openerp_sxw2rml.py: 
OpenERP SXW2RML - The OpenERP's report engine

OpenERP SXW2RML is part of the OpenERP Report Project.
OpenERP Report is a module that allows you to render high quality PDF document
from an OpenOffice template (.sxw) and any relationl database.
: not found
./openerp_sxw2rml.py: 31: ./openerp_sxw2rml.py: __version__: not found
./openerp_sxw2rml.py: 34: ./openerp_sxw2rml.py: import: not found
./openerp_sxw2rml.py: 35: ./openerp_sxw2rml.py: import: not found
./openerp_sxw2rml.py: 36: ./openerp_sxw2rml.py: import: not found
./openerp_sxw2rml.py: 37: ./openerp_sxw2rml.py: import: not found
./openerp_sxw2rml.py: 38: ./openerp_sxw2rml.py: import: not found
from: can't read /var/mail/reportlab.lib.units
./openerp_sxw2rml.py: 40: ./openerp_sxw2rml.py: import: not found
./openerp_sxw2rml.py: 41: ./openerp_sxw2rml.py: import: not found
./openerp_sxw2rml.py: 43: ./openerp_sxw2rml.py: class: not found
./openerp_sxw2rml.py: 44: ./openerp_sxw2rml.py: General DOM API utilities.: not found
./openerp_sxw2rml.py: 45: ./openerp_sxw2rml.py: Syntax error: "(" unexpected

Why is this happening? Has anybody had the same problem?

Any help would be appreciated.

Sajad KK
On 10/31/14, 2:20 AM

Run it using python

sudo python ./openerp_sxw2rml.py /opt/openerp7/addons/base_report_designer/openerp_sxw2rml/account_balance.sxw > /opt/openerp7/addons/base_report_designer/openerp_sxw2rml/account_balance.rml

Thank you!!! I had to specify python, that was the point!

Juan Formoso
on 10/31/14, 4:12 AM

Ben Bernard

--Ben Bernard--
| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 10/31/14, 1:15 AM

You can also use openerp report designer plugin for Open Office writer. With this tool, you can directly update your report in the database.

Can I install the same plugin in LibreOffice?

Juan Formoso
on 10/31/14, 4:10 AM

Not sure. I myself have LibreOffice 4 for my need and OpenOffice 3 for openerp need. As a not, it's not compatible with OO 4.

Ben Bernard
on 10/31/14, 4:42 AM

Ok, thank you Ben!

Juan Formoso
on 10/31/14, 10:38 AM

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

1 follower(s)


Asked: 10/30/14, 12:59 PM
Seen: 951 times
Last updated: 3/16/15, 8:10 AM