This question has been flagged
4 Replies
24915 Views
Hello,

I try to install a custom module by Ubuntu server 16.04 LTS, but I have no good right !!!

First metho I Try :

$ sudo chmod 755 -R odoo/

$ ls -lh

total 8,0K

drwxr-xr-x 5 odoo odoo 4,0K janv. 5 09:03 odoo

It's don't work !

Other try :

$ sudo chown -R root /odoo

result :

drwxr-xr-x 5 root odoo 4,0K janv. 5 09:03 odoo

Please could you help me to change my right to install custom module ?

thank you
Pat



Avatar
Discard

Please read the documentation about installing and deploying Odoo (www.odoo.com/documentation) carefully until you have understood it.

Best Answer

Prerequisites:

- you are working as the default user (usually this is "ubuntu")

- create a folder "transfer" in your home directory:

ubuntu@ip-192-168-110-106:~$ mkdir transfer

- locate your Odoo-Home directory, if you are using Odoo's package install, then your Odoo-Home is located here: "/usr/lib/python3/dist-packages/odoo". If you use another installation method, which is not recommended if you need to follow this post, then check your installation.

- create a folder for your custom or third-party apps at "Odoo-Home/custom/addons". Make sure you have specified this folder as addon-path in your odoo.conf file. Or use the addons folder of your odoo.conf file, if you have already specified and implemented it.

STEP 1

Use ssh or any similar tool (WinSCP or Filezilla for example) to transfer your module to your transfer folder "/home/ubuntu/transfer". Unzip it before the transfer or afterwards, but then delete the .zip archive file afterwards.

STEP 2

Create a bash-file (or use the following commands manually), such as "install_modules.sh" for example to move the module(s) from "/home/ubuntu/transfer" to "Odoo-Home/custom/addons" (replace Odoo-Home with your proper path) and to ensure proper permissions and access rights.

#!/bin/bash
sudo rsync -a /home/ubuntu/transfer/ /Odoo-Home/custom/addons/
sudo rm -rf /home/ubuntu/transfer/*
sudo chown -R root:odoo /Odoo-Home/custom/addons/
sudo find /Odoo-Home/custom/addons/ -type d -exec chmod 755 {} \;
sudo find /Odoo-Home/custom/addons/ -type f -exec chmod 644 {} \;
Save the file and execute it from your home directory by using the command

ubuntu@ip-192-168-110-106:~$ sh install_modules.sh

Happy installing!

Avatar
Discard

Hi Ermin Trevisan thanks for your answer it was super useful.

I would like to add to your answer the following steps:

Step 3:

Activate developer mode on Settings> General Settings > Activate developer mode

Step 4:

Go to Apps menu and click on Update Apps List.

Those are the only extra steps I had to do to make it work.

Note: Im on Odoo 13

Best Answer
sudo mkdir /../../odoo/<custom_addons> 
sudo chown -R odoo:odoo /../../odoo/<custom_addons>

Hi Patrick Strzempek,

Use these comments, 
to create and give permission, add your custom modules to this folder and try again.

For more reference 
https://www.cybrosys.com/blog/how-to-install-custom-modules-in-odoo 

Avatar
Discard
Author Best Answer

Hi,

Thank's for all of your answers, Your explanations helped me to realize this custom module installation.

to sum up :

The more simply method I use, is to change all right for all folder after /odoo/... :

sudo chown -R odoo:odoo /../../odoo/custom/addons

for :

sudo chown -R <user>:<user> /../../odoo/custom/addons

I load my zip file in my custom folder, unzip file.

do not forget to restore rights such as originally, otherwise Odoo does not work :
sudo chown -R odoo:odoo /../../odoo/custom/addons

Thank's

Patrick



Avatar
Discard
Author

Sorry don't use this way... problem to change POS