我正在尝试使用openerp_sxw2rml.py将 SXW 文件转换为 RML 文件,但它给出了太多错误并且它正在生成一个空的 RML 文件。我确信 SXW 的内容是正确的,因为我使用 OpenERP 模块中的现有 SXW 文件来检查它们是否以正确的方式进行转换。
例如,我从account模块中复制了account_balance.sxw,并将其粘贴到openerp_sxw2rml文件夹中进行测试。然后我执行了这个:
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
结果是下一个:
./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
为什么会这样?有没有人有同样的问题?
任何帮助,将不胜感激!