¡BIENVENIDO AL FORO DE ODOO ARGENTINA!

BRINDAMOS UN ESPACIO A LA COMUNIDAD ARGENTINA DE ODOO PARA CENTRALIZAR EL DEBATE, COMPARTIR IDEAS, DESARROLLOS, Y FORMAR PARTE DE UNA COMUNIDAD QUE CRECE DÍA A DÍA

¿No estás registrado?  REGISTRATE

Se marcó esta pregunta
4 Respuestas
18207 Vistas

Hola a todos, ante todo me presento, mi nombre es Angel y recién estoy arrancando con Odoo.

Estoy teniendo un problema con Aeroo, espero no ser el primero que lo experimenta y tal vez puedan darme una mano.

Tengo instalado Odoo 8 en Ubuntu 12.04 con la localización argentina (no desde Docker, instalación manual).

Me está resultando imposible conectar Aeroo para tirar PDF. Probé siguiendo este tutorial: http://blog.emiprotechnologies.com/install-aeroo-report-in-openerp-v6-1-in-ubuntu-12-04-by-command/ (que levanta por el 2002)

Probé también con https://github.com/ingadhoc/docker-aeroo-docs.git y al querer conectar por el 8989 queda "cargando" y no responde, o (a veces) tira: 

Failure! Connection to DOCS service was not established or convertion to PDF unsuccessful!

Details

'Response' object has no attribute 'json'

2 consultas: 

1) alguien sabe cómo resolverlo?

2) existe alguna forma de implementarlo en 14.04 con Aeroo? se sobre el problema que había con python-uno, pero tal vez alguien pudo resolverlo

 

Cualquier ayuda será muy agradecida

Saludos!

 

Avatar
Descartar
Mejor respuesta

Hola Angel

Encontre esto y funciona parcialmente ya que se genera el pdf pero el pdf tiene problemas y quedé trabado ahi, no pude resolverlo.

Ubuntu 14.04 Aeroo Reports installation method:

 

Install Git:

#0      sudo apt-get install git

 

Install AerooLib:

 

#1      sudo apt-get install python-setuptools
#2      sudo apt-get install python-genshi python-cairo python-lxml
#3      sudo apt-get install libreoffice-script-provider-python
#4      sudo mkdir /opt/aeroo
#5      cd /opt/aeroo
#6      sudo git clone https://github.com/aeroo/aeroolib.git
#7      cd /opt/aeroo/aeroolib
#8      sudo python setup.py install

Create Init Script for OpenOffice (Headless Mode) - (see: https://www.odoo.com/forum/help-1/question/how-to-install-aeroo-reports-2780 for original post from Ahmet):

#9        sudo pico -w /etc/init.d/office
#10      Copy and paste this:

#!/bin/sh

/usr/bin/soffice --nologo --nofirststartwizard --headless --norestore --invisible "--accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;" &

#11        sudo chmod +x /etc/init.d/office
#12        sudo update-rc.d office defaults
#13        sudo /etc/init.d/office
#14        telnet localhost 8100
#15        You should see something like the following message (this means it has established a connection successfully):

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
e--'com.sun.star.bridge.XProtocolPropertiesUrpProtocolProperties.UrpProtocolPropertiesTidE--L

 

 

 

Install AerooDOCS (see: https://github.com/aeroo/aeroo_docs/wiki/Installation-example-for-Ubuntu-14.04-LTS for original post):

#16      sudo apt-get install python3-pip
#17     sudo pip3 install jsonrpc2 daemonize
#18     cd /opt/aeroo
#19     sudo git clone https://github.com/aeroo/aeroo_docs.git
#20     sudo python3 /opt/aeroo/aeroo_docs/aeroo-docs start -c /etc/aeroo-docs.conf
#21     sudo ln -s /opt/aeroo/aeroo_docs/aeroo-docs /etc/init.d/aeroo-docs
#22     sudo update-rc.d aeroo-docs defaults
#23     sudo service aeroo-docs start
                 [ ! ]  If you encounter and error "Unable to lock on the pidfile while trying #16 just restart your server (sudo shutdown -r now)                         and try #16 again after reboot.

 

Install Odoo from Source:

#24      cd /tmp
#25     sudo wget https://raw.githubusercontent.com/lukebranch/odoo-install-scripts/master/odoo-saas4/ubuntu-14-04/odoo_install.sh
#26     sudo sh odoo_install.sh
#27     restart the server (sudo shutdown -r now)

 

Install Aeroo Reports:

#28    sudo apt-get install python-cups
#29    cd /opt/odoo/custom
#30    sudo git clone -b master https://github.com/aeroo/aeroo_reports.git

After following the (above) steps in this guide you should have Aeroo Reports installed correctly on your server for Ubuntu 14.04 and Odoo 8.0. You'll just need to create a database and install the required Aeroo reports modules you need for that database.

[ ! ]    Do not have aeroo_report_sample in your addons directory or you will get an error message when updating module list:
         Warning! Unmet python dependencies! No module named cups

Install report_aeroo module in Odoo database:

#31    Go to Settings >> Users >> Administrator in the backend of Odoo
#32    Tick the box next to 'Technical Features' and Save, then refresh your browser window.
#33    Go to Settings >> Update Modules List > Update
#34    Go to Settings >> Local Modules > Search for: Aeroo
#35    Install report_aeroo
#36    You'll be confronted with an installation wizard, click: Continue >> Choose Simple Authentication from the Authentication dropdown list, and add username and password: anonymous
[ ! ]     You can change the username and password in: /etc/aeroo-docs.conf if required.
#37    Click Apply and Test. You should see the following message if it was successful:

 

Success! Connection to the DOCS service was successfully established and PDF convertion is working.

You now have a fully operational Aeroo Reports installation in Ubuntu 14.04. If for any reason this is not working for you please post back in the comments and explain the error message you are seeing.

Avatar
Descartar
Mejor respuesta

Yo estoy usando esto, y lo tengo funcionando en ubuntu 14.04:

sudo docker run -p 8989:8989 --name="aeroo_docs" --restart=always -d rvalyi/aeroocker

el módulo _ooo lo tengo que conectar al puerto 8989.

Avatar
Descartar
Autor Mejor respuesta

Gracias a todos por las respuestas. Lo instalé a mano en 14.04 junto con el docker aeroo-docs.

Ahora al conectar al 8989 da el mensaje de "Success!" y luego tira esto:

Odoo Server Error
Traceback (most recent call last):
  File "/home/odoo/src/odoo/8.0/openerp/http.py", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/8.0/openerp/http.py", line 567, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/src/odoo/8.0/openerp/http.py", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/src/odoo/8.0/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/8.0/openerp/http.py", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/8.0/openerp/http.py", line 796, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/8.0/openerp/http.py", line 396, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/custom/private/loempia/controllers/embed.py", line 49, in download_urls
    mods_to_install = Modules.compute_modules_to_install(series, module_names, local_modules)
  File "/home/odoo/src/odoo/8.0/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/odoo/src/custom/private/loempia/loempia2.py", line 959, in compute_modules_to_install
    assert len(mids) == len(set(requested_mods)), 'Unknown modules requested: %r' % requested_mods
AssertionError: Unknown modules requested: ['enabled']

Y en la consola:

2015-05-12 13:01:59,179 15885 ERROR exor report_aeroo: Report generation error!
Traceback (most recent call last):
  File "/home/angel/.local/share/Odoo/addons/8.0/report_aeroo/report_aeroo.py", line 580, in create_aeroo_report
    data = basic.generate(**oo_parser.localcontext).render().getvalue()
  File "/usr/local/lib/python2.7/dist-packages/aeroolib/plugins/base.py", line 51, in render
    return self.serializer(self.events)
  File "/usr/local/lib/python2.7/dist-packages/aeroolib/plugins/opendocument.py", line 1162, in __call__
    for kind, data, pos in stream:
  File "/usr/local/lib/python2.7/dist-packages/genshi/template/base.py", line 617, in _include
    for event in stream:
  File "/usr/local/lib/python2.7/dist-packages/genshi/template/markup.py", line 326, in _match
    for event in stream:
  File "/usr/local/lib/python2.7/dist-packages/genshi/template/base.py", line 577, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/usr/local/lib/python2.7/dist-packages/genshi/template/base.py", line 289, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/usr/local/lib/python2.7/dist-packages/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "<string>", line 1, in <Expression u'__filter(hello_world(o.name))'>
  File "/home/angel/.local/share/Odoo/addons/8.0/report_aeroo/report_aeroo.py", line 98, in lookup_name
    orig = super(DynamicLookup, cls).lookup_name(data, name)
  File "/usr/local/lib/python2.7/dist-packages/genshi/template/eval.py", line 309, in lookup_name
    val = cls.undefined(name)
  File "/usr/local/lib/python2.7/dist-packages/genshi/template/eval.py", line 410, in undefined
    raise UndefinedError(key, owner=owner)
UndefinedError: "hello_world" not defined

 

Luego al querer imprimir Sample Report:

Aeroo Reports: Error while generating the report.
"hello_world" not defined
"hello_world" not defined
For more reference inspect error logs.

<type 'exceptions.Exception'>,Aeroo Reports: Error while generating the report.
"hello_world" not defined
"hello_world" not defined
For more reference inspect error logs.,<traceback object at 0x7fbb28067e60>

Avatar
Descartar

Buenas Angel... Pudiste solucionar este problema? estoy con este problema y no se por donde encaminar la solución. Saludos.

Mejor respuesta

Hola, yo instalé aeroo reports así en ubuntu 14.04 y funciona bien con odoo V8

# Actualizar repositorio y server
sudo apt-get update
sudo apt-get upgrade -y
# Instalar Java Runtime (necesario para Libreoffice)
sudo apt-get install default-jre -y
# Instalar Libreoffice como servicio en puerto 8100 del localhost
sudo apt-get install libreoffice libreoffice-script-provider-python -y
echo '#!/bin/sh' | sudo tee /etc/init.d/office
echo '/usr/bin/libreoffice --headless --accept="socket,host=localhost,port=8100,tcpNoDelay=1;urp;" &' | sudo tee -a /etc/init.d/office
sudo chmod +x /etc/init.d/office
sudo update-rc.d office defaults
sudo /etc/init.d/office
# Verificar si Libreoffice está escuchando
telnet localhost 8100
# Probar si Libreoffice hace las conversiones de formatos con unoconv

sudo apt-get install unoconv
unoconv -p 8100 -f xls pepe.ods
unoconv -p 8100 -f pdf pepe.odt
unoconv -p 8100 -f doc pepe.odt

# Instalar herramientas y dependencias de aeroolib
sudo apt-get install git -y
sudo apt-get install python-setuptools
sudo apt-get install python-lxml -y
# Instalar aeroolib desde github oficial
sudo mkdir /opt/aeroo
cd /opt/aeroo
sudo git clone https://github.com/aeroo/aeroolib.git
cd /opt/aeroo/aeroolib
sudo python setup.py install

# Instalar dependencias de aeroo-docs
sudo apt-get install python-genshi python-cairo -y
sudo apt-get install python3-pip -y
sudo pip3 install jsonrpc2 daemonize
# Instalr aeroo_docs desde github oficial
cd /opt/aeroo
sudo git clone https://github.com/aeroo/aeroo_docs.git
yes | sudo python3 /opt/aeroo/aeroo_docs/aeroo-docs start -c /etc/aeroo-docs.conf
sudo ln -s /opt/aeroo/aeroo_docs/aeroo-docs /etc/init.d/aeroo-docs
sudo update-rc.d aeroo-docs defaults
sudo service aeroo-docs start
sudo service aeroo-docs restart

# Despues de instalar odoo, instalamos aeroo-reports oficial desde github 
sudo apt-get install -y git python-pip
sudo apt-get install -y python-dev libcups2-dev
sudo pip install pycups
git clone -b master https://github.com/aeroo/aeroo_reports.git
sudo cp -Rf aeroo_reports/* path-a-tu-directorio-de-addons-de-odoo/
echo -e "\n---- Go to Settings >> Local Modules > Search for: report-aeroo and install  ----"
# Install report_aeroo
# Go to Settings >> Users >> Administrator in the backend of Odoo
# Tick the box next to 'Technical Features' and Save, then refresh your browser window.
# Go to Settings >> Update Modules List > Update
# Go to Settings >> Local Modules > Search for: Aeroo
# Install report_aeroo
# Click: Continue >> Choose Simple Authentication from the Authentication dropdown list, and add username and password: anonymous
# [ ! ] You can change the username and password in: /etc/aeroo-docs.conf if required.
# Click Apply and Test. You should see the following message if it was successful:
# Success! Connection to the DOCS service was successfully established and PDF convertion is working.

Con esta instalación puedo imprimir reportes de aeroo en pdf y libro de IVA en excel!

Avatar
Descartar