How to create manifest file in Odoo ?

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

  • {
  •     'name': 'student',

    •     Module related names are written here.

        'version': '1.0',

    •    Write here a module version.

       'sequence': 1,

    • It displays the sequence number of modules.

    'category': 'Generic Modules/Tools',

    • ​Write category name.

    'description':"""- student\n""",

    • ​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.

    'summary': 'student',

    • ​You write your file name and write its summary.

    ​'author': 'DevIntelle Consulting Service Pvt.Ltd',

    • Write here the author name.

    ​'website': 'http://www.devintellecs.com',

    • ​This is the optional section, if you want to show our author/company website URL in a module, write here the website URL.

    ​'depends': [ ],

    • ​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.

    ​'data': [

            'security/ir.model.access.csv',

            'views/main_menu_view.xml',

            'views/student_view.xml',

            ],

    • ​Views folder in save all file access here and security file.

    ​'demo': [ ],

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

    'css': [‘static/src/css/style.css’],

    • Here specify a custom css file path.

    'qweb': [ ],

    • This is for loading all your qweb templates. Generally, the  javascript template file is recorded here.

    'installable': True,

    • This section is used to define whether a module is installable in a server from web UI or not.

    ​'application': True,

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

    ​'auto_install': False,

    • The module will be automatically installed if all its dependencies are installed.

    ​}

     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 ,

Administrator February 1, 2024
Share this post
Archive
Sign in to leave a comment