Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3006 Lượt xem

Hi,

I refer 'hr' module in the manifest file but this module located in 2 different locations, one at custom addons (e.g. '/mnt/extra-addons/') and the other is at default location (e.g. '/usr/lib/python3/dist-packages/odoo/addons'). How could I refer to the one at '/mnt/extra-addons/' because system gives me the one at default location intead.

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

Thanks for the reply,

It doesn't work even I change order, the system still loads only this addons, /usr/lib/python3/dist-packages/odoo/addons, before by default. I can't see /mnt/extra-addons/ in the app list.

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

did you restarted the odoo service after changing the conf file ? you are sure that you are in the right conf file itself ?

Tác giả

Actually, I run it on docker. I copied original modules into /mnt/extra-addons/ because when I create a model I want it inherits from /mnt/extra-addons/ instead of /usr/lib/python3/dist-packages/odoo/addons which is the location of original modules. The reason I copy it because sometimes I want to modify the base model so I don't want to ruin the original model. But it seems the system forces me to inherit the original model instead because it's the same module name as the one I copied.

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

Hi,

If you have a module placed in multiple locations in the addons paths, then odoo will be taking the module from the first path in the addons path.

So in your case if you need to prioritize modules in this path /mnt/extra-addons/, set this as the first path in addons path.


addons_path = /mnt/extra-addons/, /usr/lib/python3/dist-packages/odoo/addons

Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 20
4709
1
thg 6 25
3254
1
thg 6 22
1942
1
thg 3 25
2537
1
thg 7 21
11201