Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

How to update and upgrade odoo custom module using docker-compose

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
odooCybrosysv17odoomateV16
2 Respuestas
9347 Vistas
Avatar
BITITI Fabrone


I created a custom module and it worked alright. However, I'm unable to update it using docker command  .

 l do not want to go the  odoo web interface go to app update the list check the app upgrade the app .

any command or any docker configuration will be welcomed

Thank you 


here is my docker-compose.yml

version: '3.1'

services: 

​odoo17: 

​ ​build: 

​ ​ ​context: ./odoo/ 

​ ​image: odoo:17 

​ ​container_name: odoo_fab17 

​ ​command: -- --dev=reload 

​ ​depends_on: - db 

​ ​ports: - "8099:8069" 

​ ​volumes: 

​ ​ ​- odoo-web-data:/var/lib/odoo

​ ​ ​ - ./odoo/addons:/mnt/extra-addons:rw 

​ ​ ​- ./odoo/entreprise:/mnt/entreprise

​ ​adminer: 

​ ​ ​image: adminer 

​ ​ ​restart: always 

​ ​ ​ports: - 8080:8080 

​ ​db: 

​ ​ ​image: postgres:15.0 

​ ​ ​container_name: fab_odoo_17 

​ ​ ​environment: 

​ ​ ​ ​- POSTGRES_DB=postgres 

​ ​ ​ ​- POSTGRES_PASSWORD=odoo 

​ ​ ​ ​- POSTGRES_USER=odoo 

​ ​ ​ ​- PGDATA=/var/lib/postgresql/data/pgdata 

​ ​ ​volumes: 

​ ​ ​ ​- odoo-db-data:/var/lib/postgresql/data/pgdata ​ ​

volumes: 

​odoo-web-data:

​ odoo-db-data:

0
Avatar
Descartar
Avatar
Gracious Joseph
Mejor respuesta

To update and upgrade an Odoo custom module using Docker and avoid using the web interface, you can achieve it by running the necessary commands directly on the Odoo container using docker exec. Here's a step-by-step guide:

1. Updating the Module with Docker

Use the following steps to update your custom module:

Step 1: Locate the Module

Make sure your custom module is located in the directory specified in your docker-compose.yml under:

- ./odoo/addons:/mnt/extra-addons:rw

Ensure the module's updated files are saved in this folder.

Step 2: Run the Upgrade Command

To update the module, use the docker exec command to access the Odoo container and run the -u flag to upgrade the module.

Here’s the command:

docker exec -it odoo_fab17 odoo --dev=reload -d <database_name> -u <module_name>
  • Replace <database_name> with the name of your database.
  • Replace <module_name> with the technical name of your module.

For example:

docker exec -it odoo_fab17 odoo --dev=reload -d my_db -u my_custom_module

2. Automating Module Updates with docker-compose

If you want the custom module to automatically update when you rebuild or restart your containers, you can add the upgrade command to your docker-compose.yml.

Modify docker-compose.yml

Update the command section in your Odoo service:

command: >
  -- --dev=reload
  -d <database_name>
  -u <module_name>

Example:

command: >
  -- --dev=reload
  -d my_db
  -u my_custom_module

Whenever you restart your containers, the module will automatically be upgraded.

3. Restart the Odoo Container

After making changes to your module or docker-compose.yml, restart your containers:

docker-compose down
docker-compose up -d

This ensures the latest module files are loaded and the upgrade command is executed.

4. Rebuilding Assets (Optional)

If your module includes JavaScript or CSS changes, you may need to rebuild Odoo assets. Run the following command:

docker exec -it odoo_fab17 odoo --dev=reload -d <database_name> -u <module_name> --load=web.assets_backend

5. Verifying the Update

  1. After running the command or restarting the container, log in to Odoo.
  2. Check if the custom module has been updated with the latest changes.

6. Debugging Tips

If the module does not update or errors occur:

  • Check the Odoo logs for issues:
    docker logs odoo_fab17
    
  • Ensure the custom module is correctly located in the addons folder.
  • Verify the module's manifest file (__manifest__.py) for any syntax issues.

This process avoids using the Odoo web interface and allows you to manage custom module updates directly from the command line using Docker. Let me know if you have further questions or encounter issues!

0
Avatar
Descartar
Avatar
Sujata
Mejor respuesta

Hello BITITI Fabrone, 

Here's how you can update your custom module using Docker Compose:

  1. Update your docker-compose.yml file:
    • Your Odoo service is named odoo17 based on your configuration. Ensure that the custom module path ./odoo/addons is correctly mounted inside the container at /mnt/extra-addons.
  2. Run the command to update the module:
    • You can update your custom module without using the web interface by running the following command:
    docker-compose run --rm odoo17 odoo -u  -d  --stop-after-init
    
    • Replace with the technical name of your custom module and with your Odoo database name.
  3. Rebuild the Docker image (optional):
    • If you've made any changes to your Docker configuration or want to ensure everything is up to date, you can rebuild the Docker image by running:
    docker-compose build
    
  4. Restart your services (optional):
    • After rebuilding, bring the services back up by running:
    docker-compose up -d
    

This process updates your custom module and ensures your Docker containers are correctly configured and running. Let me know if it helps :)

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
how to run Odoo test cases with custom module in odoo.sh
odoo odoosh v17 odoo16 V16
Avatar
0
may 24
1814
Since 17.0, the "attrs" and "states" attributes are no longer used. Resuelto
odoo v17
Avatar
Avatar
Avatar
Avatar
Avatar
7
oct 25
31677
How to Remove powered by odoo from online invoice footer ?
odoo v17
Avatar
Avatar
Avatar
2
jul 25
2886
UncaughtPromiseError after insert and apply embeded code in the footer
odoo v17
Avatar
0
mar 25
1863
[FR/EN]Problème pour envoyer des mails dans les factures/devis / Problem sending emails in invoices/quotes
odoo v17
Avatar
1
jul 24
2689
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now