How to create and install Modules in Odoo

Hello how are you guys, I hope you will be fine and also enjoying this tutorial!!! 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.

How to create module 

Odoo provide a mechanism to set up a new empty module, has a sub command scaffold to create an empty module. To create a module we use following command on command line.
" 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 is the automated creation of a skeleton structure to creating a new module in odoo. Scaffolding is available via the scaffold sumcommand.

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


       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 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
     3. Click on "Edit" button and checked "Technical Features" check box and click on "Save" button.
    4. Refresh the page.
    5. Now click on "Update Module List" menu item.
     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):


    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".

No comments :

Post a Comment

Leave A Comment...