Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
1571 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 25
478
0
mrt. 25
689
0
mrt. 25
588
1
mrt. 25
1709
2
apr. 24
1561