Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

Efficient way to migrate to production in Odoo.sh

Naroči se

Get notified when there's activity on this post

This question has been flagged
migrationOdoo.shDatabase
1 Odgovori
5270 Prikazi
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
Opusti
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
Opusti
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!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
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
mar. 25
2489
Odoo sh db migration error from odoo 16 to Odoo 18
migration odoo Odoo.sh odoo16
Avatar
0
nov. 25
51
Odoo16E To Odoo18E Odoo.sh Test upgrade failed Solved
migration newsletter Odoo.sh Odoo18.0
Avatar
Avatar
1
okt. 25
845
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
avg. 24
3236
How to Add a User to Access the Database on Odoo.sh?
Odoo.sh
Avatar
Avatar
1
okt. 25
4026
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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