Odoo Module Structure

Hello Odooers, Odoogig and Odoo Lovers,

In this Odoo Technical Tutorial, I am going to talk about module structure of odoo

  • Before creating any odoo module you should have first knowledge of odoo module structure.
  • SO, In this Odoo technical tutorial I would like to explain about Odoo module structure in depth.



  • It’s initialisation python file of odoo module where all other python file are imported. Means, you can import all the python files directory which used in odoo module. Let’s say in module you have 2 model files named with test.py and hello.py
odoo __init__.py file
odoo __init__.py file
  • For example  from . import module or from . import wizard



  • A manifest file of the module. It contains all information about module like module name,  version, category, description, summary, associated views, demo , data files. it also contain the who written the module author name and it’s website details inside.



  • Directory contains all your python (.py) files. All the python models that you create or inherit goes into this directory.
  • For e.g. –test.py,  hello.py
  • Note:- All the .py files which is in models folder we must import into __init__.py file
  • So in main init file you have to import models like this: form . import models
  • In models there are 3 files test.py, hello.py and init.py. Now in init file of model you have to import those 2 py files like this: from . import hello.py



  • Directory contains all your .xml files. where you can design odoo views like form view, tree view, search views, action, menu etc


  • Data files is necessary files which will load predefined data into database when installing any module/apps in odoo. for example Product module unit of measures is predefined data



  • Demo data files only loaded when you mark “Load demonstration data” true when create database in odoo. otherwise it will not load into database. demo data is testing purpose data which may help how to record data in few application and how to test it with some bunch of pre-loaded data.
  • Load demonstration data (Check this box to evaluate Odoo)



  • Directory having with few sub directory which contain all the website related files like js, img css,xml, font
    1.  src
      • css : It contain all .css files which is use for designing
      • img:– it contain all images
      •  js:– it contain all .js files
      • xml:– it contain all .xmls files used for view/qweb templates
    2. description
      •   it contain module brief introduction file called “Index.html” , where you can demonstrate about     module functionality with screen shots
      • it’s also contain the icon.png file which you used for module icon



  • It’s contain model that extends the class TransientModel instead of Model and contains it’s view files.
    it’s temporary model which will deleted automatically after execute.



  • It contain all the report file. Report all .py (parser) file and .xml file for qweb to design pdf report in odoo



  • Directory contain main file to set up access rights, roles and permission, groups etc.
    • Access rights csv file(ir.model.access.csv)
      • To assign access like read, write,create, delete permission based on model, user group
    • security.xml
      • Which contain to create groups, category, record rules etc.



  • Controller file which handle requests from web browsers and response to the server.



  • Directory contains the translation of module in different languages. Mainly contains two type of files .po and .pot. in which .po files are the actual translation files and .pot is the template for the translation.



  • Directory contains documentation file in .doc format which having more information about module functionality.



  • In odoo testing file will kept into test directory. it contain different .py and .yml file having different test cases.


  • For any  query and question ask us in below comments.
  • To get more odoo updates join with us our newsletters !



We’d Love to Hear from You! We are happy to answer any questions, you have regarding My Training.

Mail : getodootraining@gmail.com

Skype : mayur_maheshwari1

What’s app : +919924542042


Leave a Reply

Your email address will not be published. Required fields are marked *