Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

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

Odoberať

Get notified when there's activity on this post

This question has been flagged
odooCybrosysv17odoomateV16
2 Replies
9966 Zobrazenia
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
Zrušiť
Avatar
Gracious Joseph
Best Answer

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
Zrušiť
Avatar
Sujata
Best Answer

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
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
how to run Odoo test cases with custom module in odoo.sh
odoo odoosh v17 odoo16 V16
Avatar
0
máj 24
1890
Since 17.0, the "attrs" and "states" attributes are no longer used. Solved
odoo v17
Avatar
Avatar
Avatar
Avatar
Avatar
7
okt 25
32854
How to Remove powered by odoo from online invoice footer ?
odoo v17
Avatar
Avatar
Avatar
2
júl 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
júl 24
2786
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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