This question has been flagged
2 Replies
3599 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.

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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

Best Answer

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

Avatar
Discard
Author

Can I install the same plugin in LibreOffice?

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.

Author

Ok, thank you Ben!