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:

Steps to create a new module in odoo:

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.

Go to http://localhost:8069 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









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 ". 7 . Search your module through search bar as shown below (in our case we searched test_module):