Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Efficient way to migrate to production in Odoo.sh

Subscriure's

Get notified when there's activity on this post

This question has been flagged
migrationOdoo.shDatabase
1 Respondre
5268 Vistes
Avatar
Sonny

As a new Odoo user and developer, my set-up was the main branch is in the staging environment and production branch is in the production. I am actually developing locally then remotely push to the main/staging environment. I will run some test there and also change some configuration using the Studio.

After successful tests, I am now ready to move the code to production. What I do was backup the staging database, Exact dump and with firestore. Then in the local production branch, I merge the main branch. Then I will import the backup, basically the staging environment and production environment having the same code and database.

I am still in development mode so this is alright, but when it is really in production with data, this procedure is not correct since it will rewrite the live data.  What is the correct way to update the code and some database values? I import the database since the changes using in Studio are stored in the database.

0
Avatar
Descartar
Avatar
Sunny Sheth
Best Answer

Hi,

  1. Understand How Odoo.sh Handles Environments:
    • Odoo.sh provides separate environments: Development, Staging, and Production.
    • Studio customizations, module changes, and configurations are stored in the Git repository or database backups managed within Odoo.sh.
  2. Workflow for Code and Studio Customization Deployment:
    • Develop Locally:
      • Continue developing and testing changes locally.
      • Push your code changes to the development branch in Odoo.sh for further validation.
    • Test in Staging:
      • Merge changes into the staging branch for testing. Odoo.sh will automatically deploy the code and create a new database from your production backup.
      • Apply Studio customizations and configurations directly in the staging environment.
  3. Export Studio Customizations as a Module:
    • After applying Studio changes:
      1. Go to Apps > Studio > Customizations > Export.
      2. Export the changes as a custom module.
      3. Commit the exported module to your Git repository in the staging branch.
    • This ensures Studio customizations are version-controlled and safely deployable.
  4. Deploy to Production:
    • Once changes are validated in staging:
      1. Merge the staging branch into the production branch.
      2. Odoo.sh will automatically deploy the updated code to production without overwriting the database.
      3. Install the custom Studio module in production to apply the Studio changes safely.
  5. Database Updates or Configurations:
    • If specific data or configuration changes need to be replicated:
      • Use data export/import tools in Odoo to transfer changes (e.g., configuration records, workflows).
      • Alternatively, use a custom data migration script if necessary and deploy it as part of the module.
  6. Backup Management:
    • Odoo.sh automatically handles backups. Ensure you download or schedule manual backups before significant updates as an additional safety net.
Advantages of Using Odoo.sh for Deployment
  1. Automated Deployment:
    • Odoo.sh automatically creates backups, deploys code, and handles environment setups during branch merges.
  2. Studio Customization Management:
    • Exporting Studio customizations as a module ensures these changes are portable and reproducible.
  3. Safe Testing:
    • The staging environment uses production data for realistic testing but remains isolated from live data.

Best Practices for Odoo.sh Deployment

  • Frequent Backups: Rely on Odoo.sh's backup system but download backups regularly for critical updates.
  • Use Branch Protections: Protect the production branch to avoid accidental changes.
  • Automate Tests: Add automated test scripts in the staging branch to validate functionality.
  • Monitor Logs: Use the Odoo.sh logs to identify and fix issues quickly during deployment.

Summary Workflow

  1. Develop locally → Push to staging branch on Odoo.sh.
  2. Test code and Studio changes in staging using a duplicate production database.
  3. Export Studio customizations as a module → Add to Git → Merge into staging branch for validation.
  4. Merge staging branch into production branch → Odoo.sh auto-deploys code and updates.
  5. Monitor logs and validate the production environment after deployment.


Best Regards,
Sunny Sheth (shethsunny555@gmail.com)

1
Avatar
Descartar
ODOO_Aspirant

Good.. Thanks

Well Explained........Have Good Days!!1

Sunny Sheth

Thanks.

Enjoying the discussion? Don't just read, join in!

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

Registrar-se
Related Posts Respostes Vistes Activitat
Odoo V16: How to Transfer an Odoo.sh Project from One Partner Account to Another? Solved
migration Odoo.sh V16
Avatar
Avatar
Avatar
Avatar
3
de març 25
2488
Odoo sh db migration error from odoo 16 to Odoo 18
migration odoo Odoo.sh odoo16
Avatar
0
de nov. 25
24
Odoo16E To Odoo18E Odoo.sh Test upgrade failed Solved
migration newsletter Odoo.sh Odoo18.0
Avatar
Avatar
1
d’oct. 25
841
Odoo version Migration through Odoo.sh - Can I keep my Existing staging branch ? Solved
migration odoo.sh staging Odoo.sh
Avatar
Avatar
Avatar
Avatar
3
d’ag. 24
3236
How to Add a User to Access the Database on Odoo.sh?
Odoo.sh
Avatar
Avatar
1
d’oct. 25
4026
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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