This question has been flagged
8 Replies
69661 Views

I'm new to Odoo and trying to create my first module, preferably a "hello world" one when it comes at complexity. What I can't really figure out is how I should create a new module and what its file structure is. I have googled about the topic and found several different examples so I'm confused what is the proper way to do it in Odoo 8. I installed Odoo as instructed at Github page with the Python script.

For example according to this guide https://doc.openerp.com/trunk/server/howto/howto_website/ I should use "oe" to generate the module. For the life of me I can't find a program like that anywhere on my Odoo installation. Then this https://doc.openerp.com/trunk/server/03_module_dev_01/ explains the different parts of a module but doesn't really provide an example. This tutorial http://thierry-godin.developpez.com/openerp/tutorial-module-creation-pos-modification-english-version/ provides a folder structure for a module, but it seems to differ from other examples by having folders and files not mentioned in the other sources.

So in short is there an up to date example of a bare-bones module or guide for creating one? Is one of the linked ones viable? 

Avatar
Discard
Author

@Nehal Nice but in the first page there is not correct xml-file to look from. Also the second link is already familiar to me. I'll try to check if I can get some pointers from it.

Best Answer

Hi Samea,

Please refer the following link to learn about creating a module in Odoo 8:

https://www.odoo.com/documentation/8.0/howtos/backend.html#build-an-odoo-module

Avatar
Discard
Best Answer

Hello,

Steps to create/install the module at Odoo

  • Create a folder then set the technical name for the module.Make sure the module technical name should not contain any spaces eg: “webkul_elearning_module”.
  • Then create an “__init__.py” file inside the folder,You can define python packages/files inside this file.
  • Then create a “__openerp__.py” file,You can define the module name(If not define the name will be ‘Unnamed’) and some other metadata.
  • Now login to your Odoo.
  • Then open developer mode at your Odoo from Odoo “settings”.
  • Then go to the “Apps” menu.
  • Inside the “Apps” menu you will see a button “Update App List”.
  • Click on that button.
  • Then check the module using the module name.
  • After that, you will find your module inside the app list.
  • Then click on the “install” button in order to install your module at Odoo end.

You can follow the steps mentioned in the blog. However, you need to replace "__manifest__.py" to "__openerp__.py" from verson before Odoo V9.

Regards


--
 Webkul
Anisha Bahukhandi
Technical Content Writer (ODOO)

Webkul Software Pvt. Ltd. Contact : India (+91)-9870284067 USA (+1)-9143531684  
Address H-28, ARV Park, Sector 63 ,
Noida-201301 (U.P.) 
India (Branch Office)

Facebook - Webkul  Twitter - Webkul  Youtube - Webkul Ticket Support - Webkul
This email and any files transmitted with it are confidential and contain privileged or copyright information. If you are not the intended recipient you must not disseminate, copy, distribute, or use this email or the information contained in it for any purpose other than to notify us. If you have received this message in error, please notify the sender immediately, and delete this email from your system.


Avatar
Discard
Best Answer

Take a look at: https://www.odoo.com/forum/Help-1/question/How-i-can-create-module-openerp-7--16336 it has links to several examples.

For starters, do a simple test with:
__init__.py
(with import of your py file in it)

__openerp__.py
(with the description of your module and import of your xml files)

your_python.py
(with your model definition)

you_views.xml
(with the view definitions of your module).

Put these files inside a folder and upload them to the "addons" folder of your server.

In your OpenERP client, go to Settings »» Update Module List. After that, go to Settings »» Installed modules; remove the "installed" filter from the search box and search for the name of your module. Your module should now show up in the "kanban view" click the Install button and it should be running!

After this first step, add complexity to it at your taste! :-)

Avatar
Discard
Best Answer

Hi,

Refer the following links:
http://www.ibcscorp.com/openerp-custom-module-development-quick-start-guide/
https://doc.openerp.com/trunk/server/03_module_dev_05/
 

Avatar
Discard
Best Answer

Hello Samea

Creating Module in Odoo8 is not that difficult.. Do not worry. examples do exist there on internet. One of the examples, step by step process of creating a complete module I am giving below.

 

http://www.mindissoftware.com/2014/08/31/odoo-addon-open-academy-step2/

 

Hopw it helps you

 

Notify me if not

 

Take Care

Avatar
Discard