Zalino Logo white

How to Create Your First App in Odoo 17 Using the scaffold Command

Odoo Login Page Image
How to Create Your First App in Odoo 17 Using the scaffold Command

To create your first app in Odoo 17 using the scaffold command, follow these steps

1. Set Up Odoo 17 Development Environment
Ensure that your Odoo 17 environment is set up correctly. You should have Odoo 17 installed and running. Also, make sure you have a directory where custom modules will be stored.
2. Navigate to the Odoo Installation Directory
Open your terminal and navigate to the Odoo installation directory where the odoo-bin file is located.
3. Use the Scaffold Command
Run the following command to create a new module (app):

./odoo-bin scaffold < module_name > < path_to_custom_addons >


    

For example, if you want to create a module called my_first_app:

./odoo-bin scaffold my_first_app ~/odoo/custom_addons

    
4. Structure of the Generated Module

my_first_app/

├── controllers/

│      └── __init__.py

│      └── controllers.py

├── models/

│      └── __init__.py

│      └── models.py

├── views/

│      └── my_first_app_views.xml

├── __init__.py

├── __manifest__.py

5. Update the Odoo Configuration
Make sure that the directory where your custom module is stored is added to the Odoo configuration file (odoo.conf):

[options]
addons_path = /path/to/odoo/addons,/path/to/custom/addons

    
6. Update the Apps List
After creating your app, log in to your Odoo instance as an administrator. Go to Apps, and click on the Update Apps List to make your new app visible.
7. Install Your App
Once you see your app in the Apps list, you can install it.

That’s it! You’ve created your first app using the scaffold command in Odoo 17.

Leave a Reply

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