How to Create a Basic Module in Odoo 17 - Odoo 17 Slides
CelineGeorge1
603 views
21 slides
Aug 16, 2024
Slide 1 of 21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
About This Presentation
A module in Odoo is a collection of files that encapsulate a specific set of features, data models, or modifications to the core system.
Size: 1.53 MB
Language: en
Added: Aug 16, 2024
Slides: 21 pages
Slide Content
How to Create a Basic Module in Odoo 17 Enterprise
Introduction Enterpr ise A module in Odoo is a collection of files that encapsulate a specific set of features, data models, or modifications to the core system. Creating a basic module involves setting up the module structure, defining its metadata in a manifest file, and then adding various components such as data files, models, views, and controllers. In this slide we’ll discuss on how to create a basic module in odoo 17
Enterprise First we can create a python package named travel_management inside the custom_addons directory and __manifest__.py file inside the custom module. __init__.py file is used to make the directory or module act like a python package. Also it is used to initialize the module. A manifest file is a python file, which contains metadata of our module.
Enterprise Inside the __manifest__.py file we can define the basic information about the module such as name, version, category, dependencies etc.
Enterprise After defining the manifest file, we can include the models which is a python package in the custom module. After creating the python package, inside it we can create the travel_management python file.
Enterprise In the python file we can define the class and the fields inside the model.
Enterprise Next, we can create the security for the model. Security file allows to control who can access the module and what they can do with the data and what menus and actions are available to users.
Enterprise After creating the security, we can create an XML file for defining the views.
Enterprise Inside it we can create a form view, tree view, an action and menu.
Enterprise
Enterprise This is the tree view for the model.
Enterprise Next, we can add the action and menu for this model
Enterprise After completing the view file, we can add the view and the security file in manifest file.
Enterprise Next, we can link all python files in the init file. In the init file which is inside the models directory, we can import the python file.
Enterprise In the init file of the module, we can import the models directory.
Enterprise From the UI, we can update the App list to show our custom module in apps list
Enterprise After updating we can install the module by clicking on Activate button.
Enterprise Now the custom module is installed.
Enterprise This is the tree view when we click on the menu Booking.
Enterprise This is the form view of the Booking menu.
For More Info. Check our company website for related blogs and Odoo book. Check our YouTube channel for functional and technical videos in Odoo. Enterprise www.cybrosys.com