Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Odoo 10 Development Essentials

You're reading from   Odoo 10 Development Essentials Explore the functionalities of Odoo to build powerful business applications.

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher Packt
ISBN-13 9781785884887
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Daniel Reis Daniel Reis
Author Profile Icon Daniel Reis
Daniel Reis
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Getting Started with Odoo Development FREE CHAPTER 2. Building Your First Odoo Application 3. Inheritance – Extending Existing Applications 4. Module Data 5. Models – Structuring the Application Data 6. Views - Designing the User Interface 7. ORM Application Logic – Supporting Business Processes 8. Writing Tests and Debugging Your Code 9. QWeb and Kanban Views 10. Creating QWeb Reports 11. Creating Website Frontend Features 12. External API – Integrating with Other Systems 13. Deployment Checklist – Going Live

Installing third-party modules

Making new modules available in an Odoo instance so they can be installed is something that newcomers to Odoo frequently find confusing. But it doesn't have to be so, so let's demystify it.

Finding community modules

There are many Odoo modules available on the Internet. The Odoo apps store at apps.odoo.com is a catalogue of modules that can be downloaded and installed on your system. The Odoo Community Association (OCA) coordinates community contributions and maintains quite a few module repositories on GitHub at https://github.com/OCA/ .

To add a module to an Odoo installation, we could just copy it into the addons directory alongside the official modules. In our case, the addons directory is at ~/odoo-dev/odoo/addons/. This might not be the best option for us since our Odoo installation is based on a version-controlled code repository, and we will want to keep it synchronized with the GitHub repository.

Fortunately, we can use additional locations for modules so we can keep our custom modules in a different directory, without having them mixed with the official ones.

As an example, we will download the code from this book, available in GitHub, and make those addon modules available in our Odoo installation.

To get the source code from GitHub, run the following commands:

$ cd ~/odoo-dev
$ git clone https://github.com/dreispt/todo_app.git -b 10.0

We used the -b option to make sure we are downloading the modules for the 10.0 version.

After this, we will have a new /todo_app directory alongside the /odoo directory, containing the modules. Now we need to let Odoo know about this new module directory.

Configuring the addons path

The Odoo server has a configuration option called addons_path to set where the server should look for modules. By default, this points to the /addons directory, where the Odoo server is running.

We can provide not only one, but a list of directories where modules can be found. This allows us to keep our custom modules in a different directory, without having them mixed with the official addons.

Let's start the server with an addons path that includes our new module directory:

$ cd ~/odoo-dev/odoo
$ ./odoo-bin -d demo --addons-path="../todo_app,./addons"

If you look closer at the server log, you will notice a line reporting the addons path in use: INFO? odoo: addons paths: [...]. Confirm that it contains our todo_app directory.

Updating the apps list

We still need to ask Odoo to update its module list before these new modules are made available for installation.

For this, we need developer mode enabled, since it provides the Update Apps List menu option. It can be found in the Apps top menu.

After updating the modules list, we can confirm the new modules are available for installation. Use the Apps menu option to see the list of local modules. Search for todo and you should see the new modules made available.

Note that the second App Store menu option displays the module list from Odoo apps store instead of your local modules:

Updating the apps list

You have been reading a chapter from
Odoo 10 Development Essentials
Published in: Nov 2016
Publisher: Packt
ISBN-13: 9781785884887
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime