Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1536 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 25
448
0
mar 25
657
0
mar 25
467
1
mar 25
1579
2
abr 24
1516