Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
27655 Lượt xem
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



Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất
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 

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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



Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 1 18
4517
2
thg 4 24
4319
2
thg 9 18
3115
2
thg 3 18
8972
1
thg 2 17
4029