It is currently Sun Feb 12, 2012 8:34 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Wed Nov 18, 2009 1:07 pm 
Offline

Joined: Wed Apr 08, 2009 2:30 pm
Posts: 73
guys,
the only way to get this module working on windows is... remove windows! :)
jokes apart... the only way is to create your own installer with all that libs inside.
I tried and tried and....tried to build it and I almost got it: I was able to install it and to launch a print but the last nth error made me gave up with that.

if you wanna try follow this http://www.openerp.com/forum/post46382.html

cheers


Top
 Profile  
 
 Post subject: Sample report
PostPosted: Thu Dec 10, 2009 12:04 pm 
Offline

Joined: Wed Nov 19, 2008 5:08 pm
Posts: 19
Hi!

I am a novice with Openoffice, How do you delete the second page from "invoice.odt" from the report_openoffice_samples?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 02, 2010 5:33 pm 
Offline

Joined: Tue Feb 02, 2010 5:24 pm
Posts: 1
Hi,

I've successfully installed report_openoffice and report_openoffice_samples, however I got the following everytime I tried to print a report:

Quote:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 687, in go
(result, format) = obj.create(cr, uid, ids, datas, context)
File "/usr/lib/python2.5/site-packages/openerp-server/addons/report_openoffice.zip/report_openoffice/report_openoffice.py", line 290, in create
return fnct(cr, uid, ids, data, report_xml, context)
File "/usr/lib/python2.5/site-packages/openerp-server/report/report_sxw.py", line 392, in create_source_pdf
result = self.create_single_pdf(cr, uid, [obj.id], data, report_xml, context)
File "/usr/lib/python2.5/site-packages/openerp-server/addons/report_openoffice.zip/report_openoffice/report_openoffice.py", line 239, in create_single_pdf
return self.create_relatorio_report(cr, uid, ids, data, report_xml, context=context, output='pdf')
File "/usr/lib/python2.5/site-packages/openerp-server/addons/report_openoffice.zip/report_openoffice/report_openoffice.py", line 199, in create_relatorio_report
basic = Template(source=None, filepath=odt_path)
File "/usr/lib/python2.5/site-packages/relatorio-0.5.3-py2.5.egg/relatorio/templates/opendocument.py", line 196, in __init__
encoding, lookup, allow_exec)
File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 377, in __init__
self.stream = list(self._prepare(self._parse(source, encoding)))
File "/usr/lib/python2.5/site-packages/relatorio-0.5.3-py2.5.egg/relatorio/templates/opendocument.py", line 208, in _parse
content = template._parse(self.insert_directives(content), encoding)
File "/usr/lib/python2.5/site-packages/relatorio-0.5.3-py2.5.egg/relatorio/templates/opendocument.py", line 263, in insert_directives
self._escape_values(tree)
File "/usr/lib/python2.5/site-packages/relatorio-0.5.3-py2.5.egg/relatorio/templates/opendocument.py", line 637, in _escape_values
for element in tree.iter():
AttributeError: 'etree._ElementTree' object has no attribute 'iter'


Can anyone please help me?

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 02, 2010 7:27 pm 
Offline

Joined: Wed Jul 09, 2008 6:31 pm
Posts: 442
Hi,
please take a look here:
https://bugs.launchpad.net/report-openo ... bug/515434

and here for introductory info:
http://kndati.lv/index.php/en/openerp/o ... rst-report

http://kndati.lv/index.php/en/openerp/o ... stallation

http://kndati.lv/forum/viewtopic.php?f=11&t=46#p183

Best regards,
Kaspars
--------------------------------
http://kndati.lv


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 09, 2010 5:44 pm 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
Hi,
I try to install the module report_openoffice with windows.
I installed all modules and dll required, changed script of start server service, OpenOffice is up and listening to port 8100.
I can load the module, but when I want to install it, after a few time, I have a wizard which say :
connection refused timed out
and a second after I do ok :
connection error
impossible to contact thee server openerp!
you should verify your network connection and server

log client :
Code:
Traceback (most recent call last):
  File "widget\view\form.pyo", line 189, in _action
  File "widget\screen\screen.pyo", line 497, in reload
  File "widget\model\record.pyo", line 233, in reload
  File "widget\model\record.pyo", line 241, in _reload
  File "rpc.pyo", line 351, in __call__
  File "rpc.pyo", line 172, in rpc_exec_auth
rpc.rpc_exception: ('C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', ' ', 'r', 'e', 'f', 'u', 's', 'e', 'd', '!')


all idea or help is welcome.
Thanks


Top
 Profile  
 
 Post subject: Re: ANNOUNCE: new module report_openoffice released
PostPosted: Tue Feb 09, 2010 6:23 pm 
Offline

Joined: Wed Dec 30, 2009 1:05 pm
Posts: 43
simahawk wrote:
Hi all,
I just released the new module 'report_openoffice'.
You can find on trunk-addons-community.
You also find a module called report_openoffice_samples which contains examples (only invoice, till now) on how to create openoffice reports.

........


Where is exactly this module ? I try to find it in the trunk you have mention it but I can't find it. Could you give the exact link ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 09, 2010 7:57 pm 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
the problem must be the version of python :


Quote:
Note: In order to use uno module included in OpenOffice, your OpenOffice distribution must be compiled for the same version of python than you use for Open ERP server.


I build server for windows with python25, and openoffice is built with python26.
But I have python26 installed too on my pc. And after installed the server, I have 2 dll python, python25.dll and python25.dll.
Isn't it enough ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 09, 2010 8:50 pm 
Offline

Joined: Wed Jul 09, 2008 6:31 pm
Posts: 442
@lurah
Please take a look two posts up... There is all information that is available for now. If you have trouble navigating the Launchpad, you can download package from our download section:

http://kndati.lv/index.php/web-links/44-open-erp-addons

@GEM
To verify this on Windows, try connecting to OpenOffice.org instance on another host over network. As I have mentioned somewhere in forum, we have connected OpenERP running on Linux and OpenOffice.org running on Win without a hitch. As you can assume they are not binary compatible.


Best regards,
Kaspars


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 10, 2010 8:52 am 
Offline

Joined: Fri Jul 11, 2008 7:14 pm
Posts: 89
@gem
I would like to admit for clearing things out.
OpenOffice itself is only required when you plan to use other output formats than odt or ods.
So if you do not want pdf conversion, then OpenOffice headless mode is not required it is being done by relatorio.
BUT.

Quote:
Note: In order to use uno module included in OpenOffice, your OpenOffice distribution must be compiled for the same version of python than you use for Open ERP server.


There are couple of modules within report_openoffice which uses 'import uno' and import 'unohelper'. Those functions depend solely on OpenOffice installation and are used when converting to other formats like pdf.

So, when you launch your OpenERP server within your particular python version, let's say 2.5 but have OpenOffice 3.x installed on that system which has 2.6 python included, then, when trying to import uno from python2.5 console you will receive segfault, because uno (remember OpenOffice 3.x) is compiled against python version 2.6.

@GEM, in your case you should launch OpenERP server within same python version of your OpenOffice python version. Also make sure adding pythonpath pointing to OpenOffice uno directory. It is for linux, but do not think it's different for windows either.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 10, 2010 4:15 pm 
Offline

Joined: Wed Jan 13, 2010 4:49 pm
Posts: 18
simahawk wrote:
Do you mean the first error "ImportError: No module named relatorio.templates.opendocument" ?

In that case I think you have some problem with the location of your python libs.

Hi, I try to install module report_openoffice in Windows, but it has the error that "No module named relatorio.templates.opendocument". I also download relatorio and openoffice-python via easy_install so I don't know how to fix it. Where should we put module relatorio and openoffice-python exactly for OpenERP server recognize them?
I guess someone had got this error like me, so please help me what to do to install module report_openoffice successfully
I'll appreciate this and thanks anyway


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 10, 2010 4:28 pm 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
Hi,
thanks for all answers,
I will test again some idea you give me and i found myself.
In fact it's hard for me to understand what module is used by what program, how all this work, because with windows python and libraries are not used like with linux (all library python are stocked in library.zip, and there is dll for python25 ....)
can you confirm me what I think :
1.python-relatorio: A templating library able to output odt and pdf files
->used by server
2.python-genshi: Toolkit for stream-based generation of output for the web
->used by server
3.PyYAML: YAML parser and emitter for Python
->used by server
4.pycairo: Python bindings for the cairo library
->used by server
5.pycha (install through python self installer # easy_install pycha, not included in base Centos distribution)
->used by server
6.python-openoffice: Python libraries for interacting with OpenOffice.org
->used by server
7.openoffice.org-pyuno : Python bindings for OpenOffice.org
->used by openoffice (integrated and activated by default for windows) and server
8.OpenOffice.org v.2.3.x or above.

Will test with openoffice 2.4 which is built with python25 ....
will give results ...
Bye.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 10, 2010 7:53 pm 
Offline

Joined: Wed Jul 09, 2008 6:31 pm
Posts: 442
Hi, GEM!

Quote:
1.python-relatorio: A templating library able to output odt and pdf files
->used by server

Templating library to output odt/ods files. This library has nothing to do with PDF. It is used by OpenERP application server.

Quote:
2.python-genshi: Toolkit for stream-based generation of output for the web
->used by server

Lower level library, used by Relatorio. It is used by OpenERP application server.

Quote:
3.PyYAML: YAML parser and emitter for Python
->used by server

Required by Relatorio, but actually not used for anything in report_openoffice. If you like you may use it for charting by PyCha. Still it is required.

Quote:
4.pycairo: Python bindings for the cairo library
->used by server

Used by relatorio.

Quote:
5.pycha (install through python self installer # easy_install pycha, not included in base Centos distribution)
->used by server

Same as for PyYAML...

Quote:
6.python-openoffice: Python libraries for interacting with OpenOffice.org
->used by server

This is core thing :)

Quote:
7.openoffice.org-pyuno : Python bindings for OpenOffice.org
->used by openoffice (integrated and activated by default for windows) and server

That what it states - bindings to OOo binary libraries. Used for interacting with OOo for converting odt/ods files into PDF.

Quote:
8.OpenOffice.org v.2.3.x or above.

Required as it installs pyuno libraries. If you do the conversion to pdf on the same server, you may use it for this task too. Still consider using 3.0 or above, as older versions create bloated pdf files and corrupt OOo graphics on conversion. Newer OOo versions are much faster and make better conversion.

Consider reading the: http://kndati.lv/index.php/en/openerp/o ... stallation

We update this file as we find out some tips and tweaks, or somebody reports us some tips.

You may find useful forum thread: http://kndati.lv/forum/viewforum.php?f=11


Best regards,
Kaspars
-------------------------------
http://kndati.lv


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 11, 2010 9:42 am 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
Hi Mr Kaspar,
Thanks for answers, it's very more clear now for me, will test with just required lib for server.
but I have problem with pyuno in openofffice 2.4 build with python25, I don't have pyuno.pyd like in openoffice26, just pyuno.dll, and it is not integrated when I build the server, will search again.
give result later.
good day
Gaspard C.


Last edited by GEM on Mon Feb 15, 2010 10:09 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 12, 2010 10:52 am 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
again some problems to solve.
perhaps a bug with pyuno.dll in what I read on the net, which don't work on version 2.4 build with python25
else in report_openoffice.DocumentConverter.py,
I adapt this code found on the net and which should work for linux and windows :

http://svn.rpmforge.net/svn/trunk/tools/unoconv/unoconv

Code:
import getopt, sys, os, glob, time

global unopath

### The first thing we ought to do is find a suitable OpenOffice installation
### with a compatible pyuno library that we can import.
extrapaths = glob.glob('/usr/lib*/openoffice*/program') + \
             glob.glob('/usr/lib*/ooo*/program') + \
             glob.glob('/opt/openoffice*/program') + \
             glob.glob('C:\\Program Files\\OpenOffice.org *\\program\\') + \
             [ '/Applications/NeoOffice.app/Contents/program', '/usr/bin' ]
for unopath in extrapaths:
    if os.path.exists(os.path.join(unopath, "pyuno.so")):
        filename = "pyuno.so"
    elif os.path.exists(os.path.join(unopath, "pyuno.dll")):
        filename = "pyuno.dll"
    else:
        continue
    sys.path.append(unopath)
    try:
        import uno, unohelper
        break
    except ImportError, e:
        sys.path.remove(unopath)
        print >>sys.stderr, e
        print >>sys.stderr, "WARNING: We found %s in %s, but could not import it." % (filename, unopath)
        continue
else:
    print >>sys.stderr, "unoconv: Cannot find the pyuno.so library in sys.path and known paths."
    print >>sys.stderr, "ERROR: Please locate this library and send your feedback to: <tools>."
    sys.exit(1)

### Export an environment that OpenOffice is pleased to work with
os.environ['LD_LIBRARY_PATH'] = '%s' % unopath
os.environ['PATH'] = '%s:' % unopath + os.environ['PATH']

### Now that we have found a working pyuno library, let's import some classes
from com.sun.star.beans import PropertyValue
from com.sun.star.connection import NoConnectException
from com.sun.star.lang import DisposedException
from com.sun.star.io import IOException, XOutputStream
from com.sun.star.script import CannotConvertException
from com.sun.star.uno import Exception as UnoException


will test.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 12, 2010 11:20 am 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
always impossible to install the module :
connection refused, timed out
but another new message of error after this first :
database not ready, currently, this database is not fully loaded and cannot be used.
and everywhere I click, I have all the time this last message.
An idea ?


Last edited by GEM on Fri Feb 12, 2010 11:27 am, edited 2 times in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC + 2 hours


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

Search for:

Protected by Anti-Spam ACP