Skip to Content
Menu
This question has been flagged
1 Reply
1494 Views

Hi,

I try to override any fonction in odoo on docker but i can't find any .py fonction in volumes

here is my compose :


version: '3.1'
services:
web:
image: odoo:16.0
depends_on:
- db
ports:
- "8069:8069"
volumes:
- odoo-web-data:/var/lib/odoo
- ./config:/etc/odoo
- ./addons:/mnt/extra-addons
db:
image: postgres:13
environment:
- POSTGRES_DB=po
- POSTGRES_PASSWORD=d
- POSTGRES_USER=5
volumes:
odoo-web-data:
odoo-db-data:

In addons ( /var/lib/odoo/addons) there is just a folder 16.0 empty.

Do I need to expose some volumes more?

Can you help me please ?

Avatar
Discard
Best Answer

Hi,

Modifying the code (i.e., function) of an Odoo module is generally not recommended as it can lead to issues with future updates and compatibility with other modules. It's generally recommended to use Odoo's built-in customization features such as creating new modules (and extend/inherit existing models) or using the Odoo Studio app instead of modifying the code directly.

In answering you question, the Odoo source code (i.e., python files) in a Odoo container, can usually be found in a folder like: /usr/lib/python3/dist-packages/odoo

You could specify a volume that uses this path or you can access this folder by running the following command: docker exec -it [container_name_or_id] /bin/bash 

But again, it's important to note that modifying the code of an Odoo module can lead to issues with future updates and compatibility with other modules.

Avatar
Discard
Related Posts Replies Views Activity
1
May 25
349
0
Mar 25
538
0
Mar 25
403
1
Mar 25
1382
2
Apr 24
1416