Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How do I setup an update script for Odoo?

Subscribe

Get notified when there's activity on this post

This question has been flagged
v8
1 Reply
12359 Views
Avatar
Bruce Letterle

I am running Odoo v8 on Ubuntu 14.04. Has anyone developed an auto update script that I can run with cron to do regular updates of the software and apps/modules?

1
Avatar
Discard
Avatar
Daniel Kauffman
Best Answer

I would not recommend doing automatic updates on a production database.

However, for performing scheduled updates or for spinning up new servers, the following configuration may be useful:

  1. Configure a production server running Debian stable plus nginx-light, odoo, postgresql, and any other dependencies, for example, cups and python-cups for printing.
  2. Configure a build server running Debian stable plus git and bzr.  ($5 server from Digital Ocean works for me.)
  3. On the build server, use git and bzr to download sources for Odoo to an Odoo repository and for various community modules to their respective repositories. See script below.
  4. On the build server, configure ~/.ssh/config to allow easy connections to your production server.  Alternatively, configure this on your production server to allow easy connections to your build server.  In either case, also configure ~/.ssh/authorized_keys on the opposite end of the connection.
  5. On the build server, use a script to rsync the Odoo sources and community module sources to your production server. Alternatively, run rsync from your production server to pull from your build server.
  6. Restart the Odoo server. Either start the server using --update=all or upgrade the modules manually from the web interface.

Here are the scripts:

# Initialize repositories on build server.

git clone https://github.com/odoo/odoo.git
cd odoo
git checkout 7.0
cd ..
bzr checkout lp:~ruchir.shukla/+junk/misc_modules_7.0 BizzAppDev

# Update repositories on build server.
cd odoo
git pull
cd ..
bzr update BizzAppDev

# Synchronize to production server oodo.example.com.
rsync --archive --delete --rsh ssh odoo/openerp root@odoo.example.com:/opt/odoo/odoo-server/
rsync --archive --delete --rsh ssh odoo/openerp-server root@odoo.example.com:/opt/odoo/odoo-server/
rsync --archive --delete --rsh ssh odoo/addons/* root@odoo.example.com:/opt/odoo/odoo-addons/official/
rsync --archive --delete --rsh ssh BizzAppDev/oerp_no_phoning_home root@odoo.example.com:/opt/odoo/odoo-addons/community/
rsync --archive --delete --rsh ssh local/my_local_module root@odoo.example.com:/opt/odoo/odoo-addons/local/

# Restart the Odoo server. Either configure the init script to use --update=all or upgrade the modules manually from the web interface.
ssh root@odoo.example.com service odoo restart

A few additional notes:

  • The scripts are for Odoo 7 so some minor adjustments would be necessary for Odoo 8.
  • The rsync commands require odoo.conf addons_path to be configured accordingly: addons_path = /opt/odoo/odoo-addons/official,/opt/odoo/odoo-addons/community,/opt/odoo/odoo-addons/local
  • Python oerplib can be very helpful for setting up new databases.  This can be scripted and run from your build server.
1
Avatar
Discard
Bruce Letterle
Author

Besides updating the sources, aren't there other steps to update the database? I saw somewhere in the docs that you also have to restart the odoo server with --update=all

Daniel Kauffman

You are correct, the modules would still need to be upgraded. I use the above process mostly during development, so I typically upgrade my local modules manually using the web interface, so that I can see any errors. But if you were not developing a module, using --update=all when restarting the Odoo server would definitely be easier.

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

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

Sign up
Related Posts Replies Views Activity
Create contact from web form opportunity
v8
Avatar
0
May 26
2
How can I get custom indicators?
v8
Avatar
0
Apr 26
2
Odoo ERP: Complete Business Management Solution for Modern Enterprises
v8
Avatar
0
Mar 26
13
How do you implement the Associations: Members website module? Solved
v8
Avatar
Avatar
Avatar
3
Jul 25
11011
How to Integrate a Full-Screen Color Testing Tool with Odoo Website Builder?
v8
Avatar
Avatar
1
May 25
3144
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 Svenska ภาษาไทย 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