我想將SXW文件轉換成RML文件,使用openerp_sxw2rml.py,但它給出了太多的錯誤,它正在生成一個空的RML文件。我確信SXW的內容是正確的,因爲我使用OpenERP模塊中現有的SXW文件來檢查它們是否以正確的方式進行了轉換。如何通過openerp_sxw2rml.py將SXW文件轉換爲RML文件?
我從帳戶模塊複製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
這究竟是爲什麼?有沒有人有同樣的問題?
任何幫助,將不勝感激!
謝謝Odedra!你的回答是對的,但我認爲sajadkk早些時候回答。我投你的一個有用的答案。 – forvas 2014-10-31 09:06:54