Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
1495 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
toukok. 25
357
0
maalisk. 25
543
0
maalisk. 25
410
1
maalisk. 25
1396
2
huhtik. 24
1426