How to do it...

The scaffold command is used from the command line:

  1. Change the working directory to where we will want our module to be. This can be whatever directory you choose, but within an addons path to be useful. Following the directory choices used in the previous recipe, it should be as follows:
$ cd ~/odoo-dev/local-addons
  1. Choose a technical name for the new module, and use the scaffold command to create it. For our example, we will choose my_scaffolded:
$ ~/odoo-dev/odoo/odoo-bin scaffold my_scaffolded 
  1. Edit the __manifest__.py default module manifest provided and change the relevant values. You will surely want to at least change the module title in the
    name key.

This is how the generated addon module should look like:

$ tree my_scaffolded
my_scaffolded
├── controllers
│ ├── controllers.py
│ └── __init__.py
├── demo
│ └── demo.xml
├── __init__.py
├── __manifest__.py
├── models
│ ├── __init__.py
│ └── models.py
├── security
│ └── ir.model.access.csv
└── views
├── templates.xml
└── views.xml

You should now edit the various generated files and adapt them to the purpose of your new module.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.130.201