SlideShare a Scribd company logo
6
Most read
How to Add New Item
in CogMenu in Odoo 17
Enterprise
Introduction
Enterprise
In Odoo 17, CogMenu (or Configuration Menu) is a feature typically found in
various modules that allows users to configure settings related to that
specific module. It has a cogwheel like icon usually located on the top left
side of the screen. By default, the features for Importing and Exporting will
be available inside the menu.
Enterprise
For example, this is the CogMenu that we can see in Sales module
Enterprise
To create a new custom menu inside this Cogmenu of Odoo 17, we can
just create a new module which will have a structure like
Enterprise
The file cog_menu.js have the javascript code
/**@odoo-module **/
import { DropdownItem } from "@web/core/dropdown/dropdown_item";
import { registry } from "@web/core/registry";
const { Component } = owl;
const cogMenuRegistry = registry.category("cogMenu");
export class CogMenu extends Component {
async actionCustomMenu() {
var currentModel = this.env.searchModel.resModel
console.log(currentModel)
// Include your action for the menu here...
}
}
CogMenu.template = "cog_menu_item.NewOption";
CogMenu.components = { DropdownItem };
export const CogMenuItem = {
Component: CogMenu,
groupNumber: 20,
isDisplayed: ({ config }) => config.viewType != "form",
};
cogMenuRegistry.add("custom-menu", CogMenuItem, { sequence: 10 });
Enterprise
The file cog_menu.xml have the xml code
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="cog_menu_item.NewOption" owl="1">
<DropdownItem class="'o_cog_menu'" onSelected.bind="actionCustomMenu">
Custom Menu
</DropdownItem>
</t>
</templates>
Enterprise
This will display the new menu item on the Cog menu as
Enterprise
We have written the bind method js code for the menu to show the current
model’s name on the console. So, on clicking the new menu item and
inspecting the page to get the console, we can see the current module name
like
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

More Related Content

PPTX
How to Add New Item in CogMenu in Odoo 18
PPTX
How to Create a Custom Screen in Odoo 17 POS
PPTX
How to Add a Custom Button in Pos Odoo 17
PPTX
How to modify_create components control buttons in Pos odoo.pptx
PPTX
How to make a component and add it to systray in Odoo
PPTX
How to Add a Custom Button in Odoo 18 POS Screen
PDF
[FEConf Korea 2017]Angular 컴포넌트 대화법
PPTX
How to Load JS Function in Menu Item Click in Odoo 17
How to Add New Item in CogMenu in Odoo 18
How to Create a Custom Screen in Odoo 17 POS
How to Add a Custom Button in Pos Odoo 17
How to modify_create components control buttons in Pos odoo.pptx
How to make a component and add it to systray in Odoo
How to Add a Custom Button in Odoo 18 POS Screen
[FEConf Korea 2017]Angular 컴포넌트 대화법
How to Load JS Function in Menu Item Click in Odoo 17

Similar to How to Add New Item in CogMenu in Odoo 17 (20)

PPTX
How to Create Owl mixin in Odoo 17 - Odoo 17 Slides
PPTX
How to Use JS Class in Form Views in Odoo 17 - Odoo 17 Slides
PPTX
How to Empty a One2Many Field in Odoo 17
PPTX
How to hide the buttons on the POS screen in Odoo 17
PDF
AKiOSMagic Manual
PPTX
MEF Deep Dive by Piotr Wlodek
PDF
Integrating into Visual Studio settings
PPTX
Chapter 1
PPTX
Uninstall Hook in Odoo 17 - Odoo 17 Slides
PDF
Bridging the gap – plugin for unity and i os
PPTX
How to Create & Manage a Dashboard Using OWL in Odoo 17
PPTX
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
PDF
What’S New In Newforms Admin
PDF
UI5con 2018: News from Control Development
PDF
Swift
DOCX
UIAutomator
PPTX
How to Create a Theme Module in Odoo 17 - Odoo 17 Slides
DOCX
Android action bar and notifications-chapter16
PPTX
How to Create & Manage a New User Menu in Odoo 18
PPTX
How to perform product search based on a custom field from the PoS screen of ...
How to Create Owl mixin in Odoo 17 - Odoo 17 Slides
How to Use JS Class in Form Views in Odoo 17 - Odoo 17 Slides
How to Empty a One2Many Field in Odoo 17
How to hide the buttons on the POS screen in Odoo 17
AKiOSMagic Manual
MEF Deep Dive by Piotr Wlodek
Integrating into Visual Studio settings
Chapter 1
Uninstall Hook in Odoo 17 - Odoo 17 Slides
Bridging the gap – plugin for unity and i os
How to Create & Manage a Dashboard Using OWL in Odoo 17
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
What’S New In Newforms Admin
UI5con 2018: News from Control Development
Swift
UIAutomator
How to Create a Theme Module in Odoo 17 - Odoo 17 Slides
Android action bar and notifications-chapter16
How to Create & Manage a New User Menu in Odoo 18
How to perform product search based on a custom field from the PoS screen of ...
Ad

More from Celine George (20)

PPTX
How to Implement OWL Notification Service in Odoo 18
PPTX
Tracking Profit Margins in Sales Orders with Odoo 18
PPTX
How to Configure Outgoing Shipment in 3 Steps Using Odoo 18
PPTX
How to Configure Outgoing Shipment in 1 Step Using Odoo 18.pptx
PPTX
How to Configure Outgoing Shipment in 2 Steps Using Odoo 18
PPTX
How to Add New Applicants in Odoo 18 Recruitment
PPTX
How to Analyze the Recruitment Process in Odoo 18 Recruitment
PPTX
How to Manage Referral Reporting in Odoo 18 Referrals
PPTX
How to Set, Track, & Review Employee Goals in Odoo 18 Appraisals
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PPTX
How to Manage Starshipit in Odoo 18 - Odoo Slides
PPTX
How to Manage Bill Control Policy in Odoo 18
PPTX
How to Manage Loyalty Points in Odoo 18 Sales
PPTX
Odoo 18 Sales_ Managing Quotation Validity
PPTX
How to Manage Global Discount in Odoo 18 POS
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
PPTX
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
How to Implement OWL Notification Service in Odoo 18
Tracking Profit Margins in Sales Orders with Odoo 18
How to Configure Outgoing Shipment in 3 Steps Using Odoo 18
How to Configure Outgoing Shipment in 1 Step Using Odoo 18.pptx
How to Configure Outgoing Shipment in 2 Steps Using Odoo 18
How to Add New Applicants in Odoo 18 Recruitment
How to Analyze the Recruitment Process in Odoo 18 Recruitment
How to Manage Referral Reporting in Odoo 18 Referrals
How to Set, Track, & Review Employee Goals in Odoo 18 Appraisals
Revamp in MTO Odoo 18 Inventory - Odoo Slides
How to Manage Starshipit in Odoo 18 - Odoo Slides
How to Manage Bill Control Policy in Odoo 18
How to Manage Loyalty Points in Odoo 18 Sales
Odoo 18 Sales_ Managing Quotation Validity
How to Manage Global Discount in Odoo 18 POS
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Tips Management in Odoo 18 POS - Odoo Slides
How to Close Subscription in Odoo 18 - Odoo Slides
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
How to Track Skills & Contracts Using Odoo 18 Employee
Ad

Recently uploaded (20)

PDF
Anesthesia in Laparoscopic Surgery in India
PDF
RMMM.pdf make it easy to upload and study
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Complications of Minimal Access Surgery at WLH
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Pharma ospi slides which help in ospi learning
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Pre independence Education in Inndia.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
Anesthesia in Laparoscopic Surgery in India
RMMM.pdf make it easy to upload and study
PPH.pptx obstetrics and gynecology in nursing
STATICS OF THE RIGID BODIES Hibbelers.pdf
Renaissance Architecture: A Journey from Faith to Humanism
102 student loan defaulters named and shamed – Is someone you know on the list?
Supply Chain Operations Speaking Notes -ICLT Program
Complications of Minimal Access Surgery at WLH
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Institutional Correction lecture only . . .
Final Presentation General Medicine 03-08-2024.pptx
Pharma ospi slides which help in ospi learning
Basic Mud Logging Guide for educational purpose
Microbial diseases, their pathogenesis and prophylaxis
Module 4: Burden of Disease Tutorial Slides S2 2025
Pre independence Education in Inndia.pdf
Cell Structure & Organelles in detailed.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O7-L3 Supply Chain Operations - ICLT Program

How to Add New Item in CogMenu in Odoo 17

  • 1. How to Add New Item in CogMenu in Odoo 17 Enterprise
  • 2. Introduction Enterprise In Odoo 17, CogMenu (or Configuration Menu) is a feature typically found in various modules that allows users to configure settings related to that specific module. It has a cogwheel like icon usually located on the top left side of the screen. By default, the features for Importing and Exporting will be available inside the menu.
  • 3. Enterprise For example, this is the CogMenu that we can see in Sales module
  • 4. Enterprise To create a new custom menu inside this Cogmenu of Odoo 17, we can just create a new module which will have a structure like
  • 5. Enterprise The file cog_menu.js have the javascript code /**@odoo-module **/ import { DropdownItem } from "@web/core/dropdown/dropdown_item"; import { registry } from "@web/core/registry"; const { Component } = owl; const cogMenuRegistry = registry.category("cogMenu"); export class CogMenu extends Component { async actionCustomMenu() { var currentModel = this.env.searchModel.resModel console.log(currentModel) // Include your action for the menu here... } } CogMenu.template = "cog_menu_item.NewOption"; CogMenu.components = { DropdownItem }; export const CogMenuItem = { Component: CogMenu, groupNumber: 20, isDisplayed: ({ config }) => config.viewType != "form", }; cogMenuRegistry.add("custom-menu", CogMenuItem, { sequence: 10 });
  • 6. Enterprise The file cog_menu.xml have the xml code <?xml version="1.0" encoding="UTF-8"?> <templates xml:space="preserve"> <t t-name="cog_menu_item.NewOption" owl="1"> <DropdownItem class="'o_cog_menu'" onSelected.bind="actionCustomMenu"> Custom Menu </DropdownItem> </t> </templates>
  • 7. Enterprise This will display the new menu item on the Cog menu as
  • 8. Enterprise We have written the bind method js code for the menu to show the current model’s name on the console. So, on clicking the new menu item and inspecting the page to get the console, we can see the current module name like
  • 9. 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