Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

Why community modules don't try to install in /opt/openerp/addons

By
Jairo Llopis
on 12/4/13, 4:21 AM 3,837 views

When trying to install any community module from OpenERP 7.0 > Configuration > Online Apps, I get this error: Permission denied: '/usr/lib/pymodules/python2.7/openerp/addons/*addon_name*' (See full traceback below).

How can I configure OpenERP to install community modules in /opt/openerp/addons?

Notes

In /etc/openerp/openerp-server.conf I have tried with all these options, but the error is always the same:

  1. addons_path = /usr/lib/pymodules/python2.7/openerp/addons/,/opt/openerp/addons/
  2. addons_path = /opt/openerp/addons/,/usr/lib/pymodules/python2.7/openerp/addons/
  3. addons_path = /usr/lib/pymodules/python2.7/openerp/addons/
  4. addons_path = /opt/openerp/addons/

openerp user in my Ubuntu system has ownership and write access to /opt/openerp/:

$ sudo -u openerp touch /opt/openerp/addons/hello
$ ls /opt/openerp/addons/
hello

Full traceback

When installing module l10n_es_toponyms:

Client Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1132, in call_button
    action = self._call_kw(req, model, method, args, {})
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 682, in install_from_urls
    shutil.move(os.path.join(tmp, module_name), module_path)
  File "/usr/lib/python2.7/shutil.py", line 296, in move
    copytree(src, real_dst, symlinks=True)
  File "/usr/lib/python2.7/shutil.py", line 175, in copytree
    os.makedirs(dst)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permiso denegado: '/usr/lib/pymodules/python2.7/openerp/addons/base_location'
2
Jairo Llopis
On 12/5/13, 6:40 AM

Quick, unsecure, bad solution:

sudo chown openerp:openerp /usr/lib/pymodules/python2.7/openerp/addons

I hope someone else can give a better one.

At the end, even this wasn't useful, because when having more than 4 users, OpenERP S.A. asks for payments to use one-click install.

To make it easier to install community modules, I created a little collection of bash scripts called OpenERP Community Repositories Installer that someone can find useful. Read its README.

Jairo Llopis
on 1/29/14, 4:35 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/4/13, 4:21 AM
Seen: 3837 times
Last updated: 3/16/15, 8:10 AM