Skip to Content
Menu
This question has been flagged
1 Reply
3961 Views

I'm looking for a way to have branches for an Odoo installation's stages(dev, staging, production), specifically focusing on changes of the Website, made by website editors using the gui editor and not code. 

I've seen where Odoo.sh and other integrators have used git, but is that just for module/app code? Or would it also handle qweb additions/changes as well. 

It seems to me that I'd want to have some kind of versioning control for the postgres db as that's where I believe the qweb changes are stored.

Am I on track with my understanding?

Thanks for your help/advice.

Avatar
Discard
Best Answer

You are correct that using version control for Odoo is a good way to manage different branches for different stages of your installation. Git is commonly used for version control in Odoo, and it can handle both module/app code as well as QWeb additions and changes.

When you make changes to the website using the Odoo GUI editor, those changes are typically stored in the Postgres database. To version control these changes, you can use git to track the changes in the database.

Here's an example of how you can set up version control for your Odoo website:

  1. Create a git repository to store your Odoo code and database.

  2. Use the Odoo Backup module to export the database from your production server.

  3. Commit the exported database to your git repository.

  4. Set up a development and staging server, and clone the git repository to these servers.

  5. Use the Odoo Backup module to restore the database to your development and staging servers.

  6. When you make changes to your website in development or staging, use the Odoo Backup module to export the updated database and commit it to your git repository.

  7. When you're ready to deploy changes to your production server, merge the changes from your development or staging branch to your master branch, and restore the updated database on your production server.

It is worth mentioning that the above approach is just one way to handle version control for the website changes.

Also, it's important to keep in mind that version controlling the database is not enough, it's also important to version control the files and addons, as well as the custom code that you wrote.

Avatar
Discard

Hi Firoz,
Thank you for providing these details. One question though, what if there are some changes in the ir_attachment table and some image references are added to the website page? How would we handle this :)

Related Posts Replies Views Activity
1
Dec 22
12200
1
Dec 19
6407
5
Aug 25
4736
0
Aug 25
154
2
Aug 25
1444