How to convert SXW file to RML file via openerp_sxw2rml.py?

I am trying to convert an SXW file to RML file using openerp_sxw2rml.py but it gives too errors and generates an empty RML file. I am sure the SXW content is correct because I am using existing SXW files from OpenERP modules to check if they are being converted correctly.

I copied the account_balance.sxw from the account module and pasted it into the openerp_sxw2rml folder to test it. Then I ran 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 as follows:

./openerp_sxw2rml.py: 30: ./openerp_sxw2rml.py: 
OpenERP SXW2RML - The OpenERP 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 anyone had the same problem?

Any help would be appreciated!

+3


source to share


3 answers


Run it with 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

      



(You must specify python instead of ./ )

+2


source


First go to path addons/base_report_designer/openerp_sxw2rml

and follow below command

General syntax

python openerp_sxw2rml.py src_path_of_sxw > dest_path_of_rml

      



Where scr_path_of_sxw

is the source path of your .sxw file and store dest_path_of_rml

is the destination path where the .rml file is stored.

Hope this helps you.

+3


source


The following pull request fixes the issue: https://github.com/odoo/odoo-extra/pull/52

Respectfully,

Malte

+2


source







All Articles