Create / Scaffold a module in Odoo

In this article, we introduce a command line which can create a module from scratch for Odoo (v10+).

Even though you can create a custom module manually by creating new folder and its necessary files, it is faster to use scaffold command. Furthermore, it auto-fill some fields for you.

Steps to scaffold a module

  • Open Command Promt as Administrator.
  • Set current directory to the folder which contains odoo-bin file. It is under “C:\Program Files (x86)\Odoo 12.0\server” in my case.
  • Run the following command
odoo-bin scaffold <module_name> <where to put it>
odoo-bin scaffold my_first_module addons

There is a situation that you encounter the following error.

'odoo-bin' is not recognized as an internal or external command,
operable program or batch file.

This happens because your machine have multiple python installed or doesn’t have one run in system’s environment. In this case, we need to execute odoo-bin from python.

"C:\Program Files (x86)\Odoo 12.0\python\python" "C:\Program Files (x86)\Odoo 12.0\server\odoo-bin" scaffold my_first_module addons/

The file is where you need to update the module’s information.

# -*- coding: utf-8 -*-
    'name': "my_first_module",

    'summary': """
        Short (1 phrase/line) summary of the module's purpose, used as
        subtitle on modules listing or""",

    'description': """
        Long description of module's purpose

    'author': "My Company",
    'website': "",

    # Categories can be used to filter modules in modules listing
    # Check
    # for the full list
    'category': 'Uncategorized',
    'version': '0.1',

    # any module necessary for this one to work correctly
    'depends': ['base'],

    # always loaded
    'data': [
        # 'security/ir.model.access.csv',
    # only loaded in demonstration mode
    'demo': [

Leave a Comment

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

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.