Editors Pick, Must Read, Odoo

Integrate Odoo with Intellij IDEs (Odoo IDE Plugin)

So you may have been wondering about: What Is Odoo ? Does Odoo have an IDE ? What is Odoo Studio ?...

Written by Amr Abd Alkrim · 4 min read >

So you may have been wondering about:

  • What Is Odoo ?
  • Does Odoo have an IDE ?
  • What is Odoo Studio ? Is Odoo Studio an IDE ? Is it Free ?
  • Is there any Odoo Studio Alternatives ?
  • Does Odoo have any IDE that support its development ?
  • If yes what IDEs support Odoo development ? Is it PyCharm ?
  • How can i integrate Odoo with Pycharm ? or How to configure PyCharm for Odoo Development in Windows/Ubuntu?
  • How can i integrate Odoo with Intellij Idea ? or any of JetBrain IDEs
  • Can i have auto code completion for Odoo specific code ?
  • Can i create Odoo New Projects or Files Faster ?
  • Run Odoo using PyCharm ? or Run Odoo Instance with specific database filter and specific Port using PyCharm ?
  • Integrate Odoo13 with PyCharm to debug on windows 10 or Can i debug Odoo modules/apps in a better organized way ?
  • Can i have Odoo code snippets that can reduce my development time for more productivity ?

This article will show you a step by step guide to integrate your Odoo development environment for better debugging and code auto completion for more productivity and code inspection for Odoo in the JetBrains IDEs Collection like Intellij idea and Pycharm .. etc

Although Odoo as a company has her own module for building Odoo Apps called “Odoo Studio” the company does not support any IDE for her developers to build apps out side here enterprise version. Odoo Studio is easy and fast to build apps with and you don’t have to write a single line of code because its integrated in Odoo UI but is not free for developers and you can’t use it without paying for it.

Most Odoo developers in the community are building their apps in Pycharm or other IDEs but there is no Odoo support in any of them. So we decided to build a plugin to help Odoo developers community who are not using Odoo Studio or can’t afford it or just they like programming them and not using UI tools like Odoo Studio.


So this plugin is an alternative solution for Odoo Studio. Before we jump to the article lets clear something up if you are not familiar with Odoo.

What is Odoo?

  • CRM
  • Website / eCommerce
  • Accounting
  • Inventory
  • Manufacturing
  • Point of sale
  • Project management
  • etc

Odoo12 Apps

This Tutorial assumes that you have a running Odoo instance in your machine if not go to the Odoo Download page and download a copy then install it.

Important:

I am using PyCharm in this Tutorial and I recommend you to use it too because Pycharm is the best IDE for Odoo Development the rest of JetBrains IDEs need more configurations like installing more plugins and PyCharm already have these plugins installed (ex. Python Plugin)

The Plugin we made is published in JetBrains market and its called “Odoo” you can install it in all JetBrains IDEs (Android Studio , PhpStorm , WebStorm , PyCharm , IntelliJ Idea .. etc ). Lets see how we can install it in PyCharm in the next steps.

Odoo Plugin

This Odoo-Intellij Plugin Adds Support for developing Odoo applications and modules with IntelliJ IDEA and PyCharm IDEs.

Plugin Dependencies

Installing this plugin will also install the Python plugin if it is not already installed in your IDE.

Install/Download plugin

Method 1 : (Not Recommended)

You can download the plugin JAR File manually from the store and import it in your IDE

Download Plugin From JetBrains’s Store

Method 2 : (Recommended)

Go to the IDE menu

File / Settings / Plugins

Search for Odoo plugin in Intellij marketplace and install Odoo

Plugin Features

Current Features

  • Collection of code snippets for Odoo

XML snippets and templates

Python snippets and templates
  • Create New Odoo Files in New Menu (Model — View — Access)

Right click on the folder you want add the new Odoo file to and choose what type of a file you want

There is a per-configured file templates to choose from with variable highlighting to help you set thing up
  • Create new projects from the IDE Welcome screen using Odoo CLI or built-in template for Odoo
  • Code completion for Odoo in Python files (This feature wont work until you enable it See how to Enable Auto Code Completion (A) below)

  • Completion for components, built-in and custom directives, and methods in templates (This feature wont work until you enable it See how to Enable Auto Code Completion (A) below)

  • Navigation from the component, custom directives and event handlers to their definition (This feature wont work until you enable it See how to Enable Auto Code Completion (A) below)

Just Click on CTRL and click over the method or class or object to see its code content

Its opens the definition of the thing you clicked on
  • Debug your code in the IDE console log (This feature wont work until you enable it See how to Enable Debugging On Your Module (B) below)

Some Features are not in the Odoo plugin because it is build in the IDE it self with the Python Plugin so you should enable the rest of the features by doing the next steps.

A) To Enable Auto Code Completion

File / Settings

1) Open project settings

File / Settings / Project your_project_name / Project Interceptor

2) Open project Tab and add the Odoo python interpreter
  • Odoo Python Path On Windows (The default one if you did not change it):

C:\Program Files (x86)\Odoo 12.0\python

  • Odoo Python Path On Ubuntu (The default one if you did not change it):

user/local/bin/python3.6


File / Settings / Project your_project_name / Project Interceptor / Show All

3) After that click on show all

File / Settings / Project your_project_name / Project Interceptor / Show All / Highlight the Path you added and Click Show Paths

4) Click show paths in the odoo python interpreter you added before and add a new path to your odoo server folder

B) To Enable Debugging On Your Module

1) Click on add run configuration after you opened your module

2) Add a python run configration and enter the odoo-bin path to run odoo instance with the database you are working on .. plus the port if you want and click ok
  • Odoo Bin Path On Windows (The default one if you did not change it):

C:\Program Files (x86)\Odoo 12.0\server\odoo-bin

  • Odoo Bin Path On Ubuntu (The default one if you did not change it):

odoo/odoo-server/odoo-bin


3) Run your Odoo instance by clicking the run button and you will get all the errors that Odoo handles in your run tab in the bottom

Documentation & Tutorials

Odoo Documentation

Here you can find more information on using Odoo 12.

Ask Questions On The Official Odoo Forum

Plugin Documentation

If you want to contribute to the plugin development please feel free to check it on Github and make a pull request https://github.com/firebitsnetwork/odoo-intellij

Thanks for reading this article clap if you find it useful and share it with someone who would be interested i will be updating it regularly for new features and enhancements.

Join Odoo Sudan Commuity

FireBits Software Solutions

Social Media

Github

Linkedin

Facebook

Twitter

Instagram

FireBits

Get The Top Technology

About Author

Written by Amr Abd Alkrim
From Mobile Apps to ERP Apps, and everything in between, I am passionate about the digital world Profile

1st Khartoum Game Jam

Amr Abd Alkrim in Featured, Game Dev, Must Read
  ·   25 sec read