Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

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

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
odooCybrosysv17odoomateV16
2 Besvarelser
9959 Visninger
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
Kassér
Avatar
Gracious Joseph
Bedste svar

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
Kassér
Avatar
Sujata
Bedste svar

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
Kassér
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
how to run Odoo test cases with custom module in odoo.sh
odoo odoosh v17 odoo16 V16
Avatar
0
maj 24
1888
Since 17.0, the "attrs" and "states" attributes are no longer used. Løst
odoo v17
Avatar
Avatar
Avatar
Avatar
Avatar
7
okt. 25
32848
How to Remove powered by odoo from online invoice footer ?
odoo v17
Avatar
Avatar
Avatar
2
jul. 25
3070
UncaughtPromiseError after insert and apply embeded code in the footer
odoo v17
Avatar
0
mar. 25
1980
[FR/EN]Problème pour envoyer des mails dans les factures/devis / Problem sending emails in invoices/quotes
odoo v17
Avatar
1
jul. 24
2785
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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