Open ERP Forum
   IndexIndex   SearchSearch     RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   RSSRSS   Mailing ListMailing List   Log inLog in 

Please help: How to convert sxw to rml
 
Post new topic   Reply to topic    Open Object Forum Index -> Reporting development
View previous topic :: View next topic  
Author Message
howtolearn



Joined: 13 Jan 2010
Posts: 16

PostPosted: Mon Feb 08, 2010 4:28 pm    Post subject: Please help: How to convert sxw to rml Reply with quote

Hi, everybody
I begin to customize new report but I have got the problem when I converted file *.sxw to *.rml
At first, I followed the instruction from Openerp books and forums that means I have installed {python25.exe, reportlab and libxml}, then typed the command in Python25.exe
C:\Python25\Lib\site-packages>tiny_sxw2rml.py "C:\test_report.sxw" > "C:\test_report.rml"
but it annonced that "invalid syntax" so how could I fix it??
By the way, am I right when I typed that command in python25.exe? if I am wrong so where should we type this command??
I really need this part. I know maybe someone can do this successfully so I hope I will receive the instruction and the advice from everybody.
I really appreciate this and thanks anyway!
Back to top
View user's profile Send private message
jmollers



Joined: 26 Nov 2009
Posts: 5

PostPosted: Tue Feb 09, 2010 9:39 am    Post subject: Reply with quote

Hi,

Try to invoke the conversion from the windows (DOS) command prompt, something like:

Python25.exe tiny_sxw2rml.py C:\test_report.sxw > C:\test_report.rml
Back to top
View user's profile Send private message
howtolearn



Joined: 13 Jan 2010
Posts: 16

PostPosted: Tue Feb 09, 2010 12:53 pm    Post subject: Reply with quote

Hi jmollers, I have done as you instruct but the cmd (DOS) reports an error that "Python25.exe is not recognized as an internal or external command,operable program or batch file" so how can I fix it.
In addition, it also generated file test_report.rml but this file only 0KB, that means it's wrong somewhere, right?
If you have converted file sxw to rml successfully, can you help me fix this problem.
Thank you for your response and instruction Smile
Back to top
View user's profile Send private message
gegard



Joined: 21 Apr 2006
Posts: 1249
Location: Cambridge, UK

PostPosted: Tue Feb 09, 2010 5:12 pm    Post subject: Reply with quote

howtolearn wrote:
... the cmd (DOS) reports an error that "Python25.exe is not recognized as an internal or external command,operable program or batch file" so how can I fix it...

When you work out how to run Python you'll be further ahead. Other forums are probably more suitable than this one for learning how to do that.
_________________
Regards,
Geoff
Seath Solutions Ltd
Back to top
View user's profile Send private message Visit poster's website
jmollers



Joined: 26 Nov 2009
Posts: 5

PostPosted: Tue Feb 09, 2010 5:31 pm    Post subject: Reply with quote

Hi,

It sounds like the python executable can't be found. You can prefix the python executable with the path it is located in. For example, if the python executable is in c:\python25\python25.exe, go to c:\python25\lib\site-packages and the command should be:

c:\python25\python25.exe tiny_sxw2rml.py c:\test_report.sxw > c:\test_report.rml

I have succesfully converted swx to rml this way. I did have to fiddle around a bit with the directories because I installed the packages incorrectly. It's been a while since I did a conversion though and I have moved to Linux since. Let me know if it works for you.
Back to top
View user's profile Send private message
howtolearn



Joined: 13 Jan 2010
Posts: 16

PostPosted: Wed Feb 10, 2010 3:56 pm    Post subject: Reply with quote

Thanks jmollers, it works but it generated file test_report.rml that contains 0 KB (that means it contains nothing). I have tried with other file ex invoices.sxw but it gets the same result! Have you ever got this problem like me?
Thanks for your being so kind ^^
Back to top
View user's profile Send private message
GEM



Joined: 21 Nov 2008
Posts: 1153
Location: Lotharingie

PostPosted: Wed Feb 10, 2010 5:36 pm    Post subject: Reply with quote

try like this (use sxw2rml which is in addons and not in python, use "" for space in path)

example :

c:\python25\python25.exe "C:\Documents and Settings\Administrateur\OpenERP AllInOne\Server\addons\base_report_designer\wizard\tiny_sxw2rml\tiny_sxw2rml.py" "C:\Documents and Settings\Administrateur\OpenERP AllInOne\Server\addons\account\report\invoice.sxw" > C:\Documents and Settings\Administrateur\OpenERP AllInOne\Server\addons\account\test.rml"

if after this you have error badzipfile see :
http://openobject.com/forum/post49385.html#49385
Back to top
View user's profile Send private message
howtolearn



Joined: 13 Jan 2010
Posts: 16

PostPosted: Sat Feb 13, 2010 11:40 am    Post subject: Reply with quote

Thanks GEM, it works now! Smile
Now, I have created a new pdf report successfully with tiny_sxw2rml
Again, Thanks for all the answer ^_^
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Open Object Forum Index -> Reporting development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum