__Manifest__ file structure with its all key details :-
Hello Odooers ,
Welcome to our odoo technical blog. In this blog we are going to discuss how __manifest__py files are created,what is the inside structure of and use of each element of a manifest file.
- These modules consist of various Python, JS, and XML files that combine together to form an app or a module in Odoo.
- Manifest file serves to declare python package as an odoo module and its write in __manifest__.py file .
- A Manifest file is a python file that basically contains all the descriptions of a module inside a single dictionary.
- One such useful and one of the most important files in odoo module is the manifest file.
{
'name': Demo,
'version': '1.1',
'sequence': 1,
'category': 'Generic Modules/Tools',
'description':
"""
This Module add below functionality into odoo
1.Demo Module \n
""",
'summary': Demo Module',
'author': 'DevIntelle Consulting Service Pvt.Ltd',
'website': 'http://www.devintellecs.com',
'depends': [ ],
'data': [ ],
'demo': [],
'test': [],
'css': [],
'qweb': [],
'js': [],
'images': [],
'installable': True,
'application': True,
'auto_install': False,
'pre_init_hook': 'pre_init_check',
}
A details explain about_manifest_.py file of a odoo module.
- {
- Module related names are written here.
- Write here a module version.
- It displays the sequence number of modules.
- Write category name.
- You should write about what the module does, its key features and all the details about the module, so that users can easily understand about Model Functionality.
- You write your file name and write its summary.
- Write here the author name.
- This is the optional section, if you want to show our author/company website URL in a module, write here the website URL.
- This section is very important in odoo manifest files when we create a module, sometimes we use some relational field or inherit model from a different module, etc. So in "depends" we add those module names in which these relational fields or models, etc are created.
- Views folder in save all file access here and security file.
- This is a list of data files that are only loaded when demonstration mode is activated during module installation, it's for creating a demo folder and its file is accessible here.
- Here specify a custom css file path.
- This is for loading all your qweb templates. Generally, the javascript template file is recorded here.
- This section is used to define whether a module is installable in a server from web UI or not.
- This represents whether the module is independent of other modules and provides new business logic to the system and is considered as an application other than providing some extra functionality to the existing logic.
- The module will be automatically installed if all its dependencies are installed.
'name': 'student',
'version': '1.0',
'sequence': 1,
'category': 'Generic Modules/Tools',
'description':"""- student\n""",
'summary': 'student',
'author': 'DevIntelle Consulting Service Pvt.Ltd',
'website': 'http://www.devintellecs.com',
'depends': [ ],
'data': [
'security/ir.model.access.csv',
'views/main_menu_view.xml',
'views/student_view.xml',
],
'demo': [ ],
'css': [‘static/src/css/style.css’],
'qweb': [ ],
'installable': True,
'application': True,
'auto_install': False,
}
IN Short , manifest file is an essential file for creating any module in odoo. This file represents the metadata like name of the module,version of the module as well as description and summary of the module.
Thanks ,
How to create manifest file in Odoo ?