Skip to content

Debug addons in vs code no muestra nada #1

@odixan

Description

@odixan

Un saludo, he intentado seguir los pasos que dejaste en el video pero aun no tengo resultados y no comprendo al final que sucede:
Intentare dejarte algunos datos por aca:

env file:

DOCKER COMPOSE

Odoo version for image build or other

ODOO_VERSION=17.0

Odoo Server ports mapping to expose on container

ODOO_MAPPING_PORT=8068:8069

Gevent or longpollin port to expose on container

GEVENT_MAPPING_PORT=8071:8072

Debugpy port used for debugging

DEBUGPY_MAPPING_PORT=3001:3001

GEVENT_SUPPORT=True

Volume for odoo source code persistence or binding volume for debug

ODOO_SERVER_SRC=/...../odoo/odoo-src

CUSTOM_ADDONS=/...../code/odoo-erp/extra-addons

ENTRYPOINT=/usr/bin/python3 -m debugpy --listen 0.0.0.0:3001 /usr/bin/odoo -c /etc/odoo/odoo.conf

POSTGRES

Default DB Name if no set is used the same value of POSTGRES_USER

POSTGRES_DB=postgres

DB USER Name used in conjuntion with POSTGRES_PASSWORD

POSTGRES_USER=odoo

DB USER Password used by postgres USER

POSTGRES_PASSWORD=odoo

###ODOO SERVER

DB HOST used by Odoo is the name of the postgres container

HOST=odb-dev

BD PORT used by Odoo is where the postgres service is published

PORT=5432

USER name used by Odoo to connect to Postgres Database same as POSTGRES_USER

USER=odoo

Password used by Odoo User to connet to Postgres Database same as POSTGRES_PASSWORD

PASSWORD=odoo

Language

LANG_i18n=es_ES

Odoo code definition of Country´s

COUNTRY_CODE=ES

Applications to install and update used con configure task.json

APPS=project_task_state_custom

##########################################################
compose file:

name: "dev"

networks:
odoo_nginx:
external: true
odoo-net-dev:
external: true
name: odoo-net-dev

volumes:
odb-data-dev:
odata-dev:
srv:

services:
odoo-dev:
build:
context: .
dockerfile: ./Dockerfile
restart: unless-stopped
env_file:
- ${PWD}/.env.dev
volumes:
- "odata-dev:/var/lib/odoo" # Filestore
- "${CUSTOM_ADDONS}:/mnt/extra-addons" # persistencia de modulos
- "${PWD}/conf/odoo.conf:/etc/odoo/odoo.conf" # persistencia de odoo.conf
- "${ODOO_SERVER_SRC}:/mnt/odoo" # for debugging purpose only
ports:
- ${ODOO_MAPPING_PORT}
- ${GEVENT_MAPPING_PORT}
- ${DEBUGPY_MAPPING_PORT}
depends_on:
- odb-dev
networks:
- odoo-net-dev
- odoo_nginx
entrypoint: ${ENTRYPOINT}

odb-dev:
image: postgres:16-alpine
restart: unless-stopped
volumes:
- "odb-data-dev:/var/lib/postgresql/data" # persistencia de Bases de Datos
env_file:
- ${PWD}/.env.dev
ports:
- "5433:5432"
networks:
- odoo-net-dev

networks:
odoo_nginx:
external: true
odoo-net-dev:
external: true
name: odoo-net-dev

volumes:
odb-data-dev:
odata-dev:

#####################################################################3
requirement

debugpy
pydevd-odoo
schwifty==2024.4.0
pytz==2022.1
hubspot-api-client==12.0.0
humanize==4.6.0
phonenumbers==8.12.1

##################################################################33
lauch.json

{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Odoo Debugpy",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 3001
},
"pathMappings": [
{
"localRoot": "/........../code/odoo-erp/extra-addons",
"remoteRoot": "/mnt/extra-addons"
},
{
"localRoot": "/........../odoo/odoo-src",
"remoteRoot": "/mnt/odoo"
}
],
"justMyCode": false
}
]
}

######################################################################
dockerfile
FROM odoo:17.0

COPY ./requirements.txt /
RUN pip install -r /requirements.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions