Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
1745 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jul. 25
343
0
jul. 25
375
1
mai. 25
857
0
mar. 25
987
0
mar. 25
914