Search Here

How to create and install Modules in Odoo

In my previous post you learned what is "Odoo Modules" and its component in detail. Now the time comes to create our first module from scratch. In this article you will learn how to create custom module in odoo from scratch.


How to create module in Odoo

Odoo provide a mechanism to set up a new empty module, odoo.py has a sub command scaffold to create an empty module. To create a module we use following command on command line.
"odoo.py scaffold <module_name> <path where to put it> ". Now here the question raise what is scaffold. Our created module should always be placed in the "addons" folder, and the path of addons folder is (C:\Program Files (x86)\Odoo 8.0-20150811\server\openerp\addons).

Scaffolding:

Scaffolding is the automated creation of a skeleton structure to creating a new module in odoo. Scaffolding is available via the odoo.py scaffold cmd command.

Steps to create a new module in odoo:

  1.  Open command prompt with (run as administrator) and change the directory to this path [ C:\Program Files (x86)\Odoo 8.0-20150811\server] 
How to create and install Modules in Odoo - Learn OpenERP
 
      
      2. Write the following command "odoo scaffold test_module openerp/addons" and hit "enter".

How to create and install Modules in Odoo - Learn OpenERP



       3. Now go to this path (C:\Program Files (x86)\Odoo 8.0-20150811\server\openerp\addons) and check that here our created empty module (test_module) is present or not. And fortunately you will see that its present. At this stage our created module is empty but you will see the directory structure Module Structure of created module, which we already discussed in detail. Below the screen shot is available of our created module.

How to create and install Modules in Odoo - Learn OpenERP

  

How to create and install Modules in Odoo - Learn OpenERP



How to Install a module:

         After creating a module its time to install it. Before installing the module you will need to follow these steps.
  1. Go to http://localhost:8069 
  2. Setting >> Users >> Users
How to create and install Modules in Odoo - Learn OpenERP




 3. Click on "Edit" button and checked "Technical Features" check box and click on "Save" button.

How to create and install Modules in Odoo - Learn OpenERP



4. Refresh the page.
5. Now click on "Update Module List" menu item.

How to create and install Modules in Odoo - Learn OpenERP

 

 6. Now you can install the modules by accessing the menu Setting >> Modules >> Local Modules
 7 . Search your module through search bar as shown below (in our case we searched test_module):

How to create and install Modules in Odoo - Learn OpenERP


 

8. Now click on "Install" button to install a module. 

At that point our module will be installed but nothing is in this module to show because we created an empty module (test_module). To day you learned how to create a module and how to install it. In my coming post we will learn how to create an "Action Menu, Tree View and From View".

Post a Comment

0 Comments