This question has been flagged
4 Replies
9837 Views

I just upgraded my development machine to Ubuntu 13.10 and report_aeroo_ooo no longer loads. The problem seems to be that the libreoffice in 13.10 uses python 3 while the openerp server is being run with python 2.7. I tried copying uno.py and unohelper.py from python3/dist-packages to report_aeroo_ooo, but that didn't work either. The exact error message is:

Warning! Unmet python dependencies!
dynamic module does not define init function (initpyuno)
dynamic module does not define init function (initpyuno)
No module named com.sun.star.beans
No module named com.sun.star.uno
No module named com.sun.star.connection
No module named com.sun.star.beans
No module named com.sun.star.lang
No module named com.sun.star.io
No module named com.sun.star.io

Does anyone know how I can get report_aeroo_ooo to work?

Avatar
Discard
Best Answer

I met problem too, it take me for hours to solve. Problem is in 13.10 don't support python-uno for python2.x like Ubuntu 13.04 raring before.

Here is solution: Very simple thought install a version support python-uno then I find the build of LibreOffice PPA for Ubuntu.

You shouldn't waste time on download build DEB from libreoffice official it not compatible in this situation. first you remove libreoffice in your machine

sudo apt-get purge libreoffice*

then remove related

sudo apt-get purge openoffice.org-dtd-officedocument1.0 python-uno python3-uno uno-libs3 ure

then

sudo apt-get autoremove

then go there https://launchpad.net/~libreoffice/+archive/ppa/+packages then you download this build

libreoffice - 1:4.1.4~rc2-0ubuntu1~raring1~ppa1

The file you will download is

 libreoffice-base-core_4.1.4~rc2-0ubuntu1~raring1~ppa1_amd64.deb 
libreoffice-writer_4.1.4~rc2-0ubuntu1~raring1~ppa1_amd64.deb 
libreoffice-calc_4.1.4~rc2-0ubuntu1~raring1~ppa1_amd64.deb 
libreoffice-core_4.1.4~rc2-0ubuntu1~raring1~ppa1_amd64.deb 
libreoffice-common_4.1.4~rc2-0ubuntu1~raring1~ppa1_all.deb
python-uno_4.1.4~rc2-0ubuntu1~raring1~ppa1_amd64.deb

You should install libreoffice-common_4.1.4 first then libreoffice-core then libreoffice-base-core then writer and calc and python-uno --> this is what we need.

Avatar
Discard

Is it still a good solution?

On launchpad, I have found only version 4.3.4, It uses python3 uno.

Found a link that provides the debs mentioned above: https://launchpad.net/~libreoffice/+archive/ubuntu/ppa/+sourcepub/3744128/+listing-archive-extra

Author Best Answer

The solution turns out to be a little complicated. I'll write a blog post to further expand on this but basically:

  • Install OpenERP in a virtualenv (this had its own set of hurdles I had to overcome)
  • Install an older version of Libreoffice (I installed ver. 3.7.2) into the virtualenv
  • Append the path to the program subdirectory of the libreoffice installation to $PYTHONPATH
Avatar
Discard

How we can do this : Install an older version of Libreoffice (I installed ver. 3.7.2) into the virtualenv ? I know that uno.py and unohelper.py are not problem, Please help us

Best Answer

I switched from LibreOffice to Apache OpenOffice 4... They still use python 2.7 so it just works...

Avatar
Discard
Best Answer

Hi! yes, I think the problem is pyuno. You should replace python3-uno by python-uno. Try sudo apt-get install python-uno

Avatar
Discard
Author

python-uno no longer exists on Saucy. It has been replaced by libreoffice-script-provider-python, which is based on python 3.