SlideShare a Scribd company logo
How to Open a Wizard When
Clicking on the Kanban Tile
in Odoo 18
Enterprise
Enterprise
Introduction
In the Odoo backend, Kanban views offer an intuitive, visual way of
managing tasks, projects, and workflows. Kanban views are just like a
card type of rectangular view which we can get the major details of the
model in which it is designed. We can also create our own new kanban
views using codes.
Here, we can discuss about how to open a wizard that appears upon
clicking a Kanban tile. For that, there are some steps like creating a
custom model for storing data, creating the model for the wizard,
designing a kanban model for the custom model, making the wizard to
open on the kanban click.
Enterprise
Using the Odoo 18, let’s create a model called ‘student.student using the
code below. And create the necessary views and menus needed.
from odoo import fields, models
class Student(models.Model):
_name = 'student.student'
name = fields.Char("Student Name")
class_name = fields.Char("Class")
roll_no = fields.Char("Roll Number")
image = fields.Binary("Image File")
tag_ids = fields.Many2many('crm.tag', 'student_tag_rel', 'student_id',
'tag_id', string='Tags')
Enterprise
Now, under the wizards directory, create a wizard using the Transient
Model as it does not need the data to get stored.
from odoo import fields, models
class ApproveStudent(models.TransientModel):
_name = 'approve.student'
name = fields.Char("Student Name")
class_name = fields.Char("Class")
roll_no = fields.Char("Roll Number")
def approve(self):
student = self.env['student.student'].browse(self.env.context.get('active_id'))
student.write({'state':'student'})
Here, we defined the method approve() which changes the current active student
record to Student state.
Don’t forget to set the access right for the wizard in the security directory.
Enterprise
Define the form view for the wizard also and mention that xml file name
in the data key of manifest of the module.
<record id="approve_student_view_form" model="ir.ui.view">
<field name="name">approve.student.view.form</field>
<field name="model">approve.student</field>
<field name="arch" type="xml">
<form string="Select the Type">
<sheet><group>
<group>
<field name="name"/>
<field name="class_name"/>
<field name="roll_no"/>
</group></group>
<footer>
<button name="approve"
type="object"
string="Convert"/>
<button string="Cancel" class="btn-default"
special="cancel" />
</footer>
</sheet>
</form>
</field>
</record>
Enterprise
Now, we need to define a simple kanban view for the custom model student.student as
<record id="student_student_view_kanban" model="ir.ui.view">
<field name="name">student.student.kanban</field>
<field name="model">student.student</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile" action="action_open_wiz" type="object">
<templates>
<t t-name="card" class="row g-0">
<div class="col-6">
Name :<field class="fw-bolder" name="name"/><br/>
Class: <field class="fw-bolder" name="class_name"/>
<field name="tag_ids" string="Tags" widget="many2many_tags"/>
</div>
<div class="col-6">
<field name="image" widget="image" class="oe_avatar"/>
</div></t>
</templates>
</kanban>
</field>
</record>
Enterprise
In the previous kanban view code we defined it like
<kanban class="o_kanban_mobile" action="action_open_wiz" type="object">
This action attribute of kanban tag decides that there is a click action
to be performed. So, we define the method action_open_wiz in the
student.student model.
Enterprise
The code for action_open_wiz is as
def action_open_wiz(self):
for rec in self:
res = {
'type': 'ir.actions.act_window',
'view_mode': 'form',
'res_model': 'approve.student',
'target': 'new',
'context': {
'default_name': rec.name,
'default_class_name': rec.class_name,
'default_roll_no': rec.roll_no
}
}
return res
This simply opens the earlier defined wizard’s form view with all the
fields prefilled with the currently active student record.
Enterprise
As a demo, the kanban view’s click on the second kanban tile will show like
The marked button Convert is assigned with the action approve which
does the state change of the selected student
Enterprise
So, in short, the action attribute of the kanban tag of a kanban view
for any model is used to trigger a function on clicking it. Here in this
slide, we used to open a custom wizard to open with this method.
In this way, in Odoo 18, we can open a wizard when clicking on the
Kanban Tile so easily.
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
Ad

More Related Content

Similar to How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18 (20)

Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Joaquim Rocha
 
How to Define Menu & Actions in Odoo 18 - Odoo 18 Slides
How to Define Menu & Actions in Odoo 18 - Odoo 18 SlidesHow to Define Menu & Actions in Odoo 18 - Odoo 18 Slides
How to Define Menu & Actions in Odoo 18 - Odoo 18 Slides
Celine George
 
Tutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo FrameworkTutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo Framework
Odoo
 
Django design-patterns
Django design-patternsDjango design-patterns
Django design-patterns
Agiliq Info Solutions India Pvt Ltd
 
How to Create a Dynamic Snippet in Odoo 17
How to Create a Dynamic Snippet in Odoo 17How to Create a Dynamic Snippet in Odoo 17
How to Create a Dynamic Snippet in Odoo 17
Celine George
 
How to Create a Custom Web Form View in Odoo 17
How to Create a Custom  Web Form View in Odoo 17How to Create a Custom  Web Form View in Odoo 17
How to Create a Custom Web Form View in Odoo 17
Celine George
 
Solid angular
Solid angularSolid angular
Solid angular
Nir Kaufman
 
HOW TO CREATE A MODULE IN ODOO
HOW TO CREATE A MODULE IN ODOOHOW TO CREATE A MODULE IN ODOO
HOW TO CREATE A MODULE IN ODOO
Celine George
 
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용날로 먹는 Django admin 활용
날로 먹는 Django admin 활용
KyeongMook "Kay" Cha
 
Views in Odoo - Advanced Views - Pivot View in Odoo 17
Views in Odoo - Advanced Views - Pivot View in Odoo 17Views in Odoo - Advanced Views - Pivot View in Odoo 17
Views in Odoo - Advanced Views - Pivot View in Odoo 17
Celine George
 
Odoo Experience 2018 - Develop an App with the Odoo Framework
Odoo Experience 2018 - Develop an App with the Odoo FrameworkOdoo Experience 2018 - Develop an App with the Odoo Framework
Odoo Experience 2018 - Develop an App with the Odoo Framework
ElínAnna Jónasdóttir
 
What is Mixin Class & How to Use Mixin Classes in Odoo 18
What is Mixin Class & How to Use Mixin Classes in Odoo 18What is Mixin Class & How to Use Mixin Classes in Odoo 18
What is Mixin Class & How to Use Mixin Classes in Odoo 18
Celine George
 
What is Monkey Patching & How It Can Be Applied in Odoo 17
What is Monkey Patching & How It Can Be Applied in Odoo 17What is Monkey Patching & How It Can Be Applied in Odoo 17
What is Monkey Patching & How It Can Be Applied in Odoo 17
Celine George
 
How to Modify Existing Web Pages in Odoo 18
How to Modify Existing Web Pages in Odoo 18How to Modify Existing Web Pages in Odoo 18
How to Modify Existing Web Pages in Odoo 18
Celine George
 
Apps 11i10 forms_personalization
Apps 11i10 forms_personalizationApps 11i10 forms_personalization
Apps 11i10 forms_personalization
Vinod Reddy
 
Personalize the forms how to oracle applications release 11.5.10 a technica...
Personalize the forms   how to oracle applications release 11.5.10 a technica...Personalize the forms   how to oracle applications release 11.5.10 a technica...
Personalize the forms how to oracle applications release 11.5.10 a technica...
FITSFSd
 
Oracle 11i forms personalization
Oracle 11i forms personalizationOracle 11i forms personalization
Oracle 11i forms personalization
Kaushik Kumar Kuberanathan
 
How to Add Sort Option in Website Portal Odoo 17
How to Add Sort Option in Website Portal Odoo 17How to Add Sort Option in Website Portal Odoo 17
How to Add Sort Option in Website Portal Odoo 17
Celine George
 
What’S New In Newforms Admin
What’S New In Newforms AdminWhat’S New In Newforms Admin
What’S New In Newforms Admin
DjangoCon2008
 
Creating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JSCreating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JS
Akshay Mathur
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Joaquim Rocha
 
How to Define Menu & Actions in Odoo 18 - Odoo 18 Slides
How to Define Menu & Actions in Odoo 18 - Odoo 18 SlidesHow to Define Menu & Actions in Odoo 18 - Odoo 18 Slides
How to Define Menu & Actions in Odoo 18 - Odoo 18 Slides
Celine George
 
Tutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo FrameworkTutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo Framework
Odoo
 
How to Create a Dynamic Snippet in Odoo 17
How to Create a Dynamic Snippet in Odoo 17How to Create a Dynamic Snippet in Odoo 17
How to Create a Dynamic Snippet in Odoo 17
Celine George
 
How to Create a Custom Web Form View in Odoo 17
How to Create a Custom  Web Form View in Odoo 17How to Create a Custom  Web Form View in Odoo 17
How to Create a Custom Web Form View in Odoo 17
Celine George
 
HOW TO CREATE A MODULE IN ODOO
HOW TO CREATE A MODULE IN ODOOHOW TO CREATE A MODULE IN ODOO
HOW TO CREATE A MODULE IN ODOO
Celine George
 
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용날로 먹는 Django admin 활용
날로 먹는 Django admin 활용
KyeongMook "Kay" Cha
 
Views in Odoo - Advanced Views - Pivot View in Odoo 17
Views in Odoo - Advanced Views - Pivot View in Odoo 17Views in Odoo - Advanced Views - Pivot View in Odoo 17
Views in Odoo - Advanced Views - Pivot View in Odoo 17
Celine George
 
Odoo Experience 2018 - Develop an App with the Odoo Framework
Odoo Experience 2018 - Develop an App with the Odoo FrameworkOdoo Experience 2018 - Develop an App with the Odoo Framework
Odoo Experience 2018 - Develop an App with the Odoo Framework
ElínAnna Jónasdóttir
 
What is Mixin Class & How to Use Mixin Classes in Odoo 18
What is Mixin Class & How to Use Mixin Classes in Odoo 18What is Mixin Class & How to Use Mixin Classes in Odoo 18
What is Mixin Class & How to Use Mixin Classes in Odoo 18
Celine George
 
What is Monkey Patching & How It Can Be Applied in Odoo 17
What is Monkey Patching & How It Can Be Applied in Odoo 17What is Monkey Patching & How It Can Be Applied in Odoo 17
What is Monkey Patching & How It Can Be Applied in Odoo 17
Celine George
 
How to Modify Existing Web Pages in Odoo 18
How to Modify Existing Web Pages in Odoo 18How to Modify Existing Web Pages in Odoo 18
How to Modify Existing Web Pages in Odoo 18
Celine George
 
Apps 11i10 forms_personalization
Apps 11i10 forms_personalizationApps 11i10 forms_personalization
Apps 11i10 forms_personalization
Vinod Reddy
 
Personalize the forms how to oracle applications release 11.5.10 a technica...
Personalize the forms   how to oracle applications release 11.5.10 a technica...Personalize the forms   how to oracle applications release 11.5.10 a technica...
Personalize the forms how to oracle applications release 11.5.10 a technica...
FITSFSd
 
How to Add Sort Option in Website Portal Odoo 17
How to Add Sort Option in Website Portal Odoo 17How to Add Sort Option in Website Portal Odoo 17
How to Add Sort Option in Website Portal Odoo 17
Celine George
 
What’S New In Newforms Admin
What’S New In Newforms AdminWhat’S New In Newforms Admin
What’S New In Newforms Admin
DjangoCon2008
 
Creating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JSCreating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JS
Akshay Mathur
 

More from Celine George (20)

How to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo SlidesHow to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo Slides
Celine George
 
How to Create A Todo List In Todo of Odoo 18
How to Create A Todo List In Todo of Odoo 18How to Create A Todo List In Todo of Odoo 18
How to Create A Todo List In Todo of Odoo 18
Celine George
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18
Celine George
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to Manage a Customer Account in Odoo 17 Sales
How to Manage a Customer Account in Odoo 17 SalesHow to Manage a Customer Account in Odoo 17 Sales
How to Manage a Customer Account in Odoo 17 Sales
Celine George
 
Ledger Posting in odoo Continental Accounting
Ledger Posting in odoo Continental AccountingLedger Posting in odoo Continental Accounting
Ledger Posting in odoo Continental Accounting
Celine George
 
How to Create & Manage a New User Menu in Odoo 18
How to Create & Manage a New User Menu in Odoo 18How to Create & Manage a New User Menu in Odoo 18
How to Create & Manage a New User Menu in Odoo 18
Celine George
 
How to Add Customer Rating Mixin in the Odoo 18
How to Add Customer Rating Mixin in the Odoo 18How to Add Customer Rating Mixin in the Odoo 18
How to Add Customer Rating Mixin in the Odoo 18
Celine George
 
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
How To Open The Form View Of Many2many Clicking Tag In Odoo 18How To Open The Form View Of Many2many Clicking Tag In Odoo 18
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
Celine George
 
The Types of Charts in Odoo 18 Spreadsheet
The Types of Charts in Odoo 18 SpreadsheetThe Types of Charts in Odoo 18 Spreadsheet
The Types of Charts in Odoo 18 Spreadsheet
Celine George
 
How to Translate Odoo 18 Website in Any Language with AI
How to Translate Odoo 18 Website in Any Language with AIHow to Translate Odoo 18 Website in Any Language with AI
How to Translate Odoo 18 Website in Any Language with AI
Celine George
 
How to Manage Work Order Dependencies in Odoo 17 Manufacturing
How to Manage Work Order Dependencies in Odoo 17 ManufacturingHow to Manage Work Order Dependencies in Odoo 17 Manufacturing
How to Manage Work Order Dependencies in Odoo 17 Manufacturing
Celine George
 
How to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo SlidesHow to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo Slides
Celine George
 
How to Create A Todo List In Todo of Odoo 18
How to Create A Todo List In Todo of Odoo 18How to Create A Todo List In Todo of Odoo 18
How to Create A Todo List In Todo of Odoo 18
Celine George
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18
Celine George
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to Manage a Customer Account in Odoo 17 Sales
How to Manage a Customer Account in Odoo 17 SalesHow to Manage a Customer Account in Odoo 17 Sales
How to Manage a Customer Account in Odoo 17 Sales
Celine George
 
Ledger Posting in odoo Continental Accounting
Ledger Posting in odoo Continental AccountingLedger Posting in odoo Continental Accounting
Ledger Posting in odoo Continental Accounting
Celine George
 
How to Create & Manage a New User Menu in Odoo 18
How to Create & Manage a New User Menu in Odoo 18How to Create & Manage a New User Menu in Odoo 18
How to Create & Manage a New User Menu in Odoo 18
Celine George
 
How to Add Customer Rating Mixin in the Odoo 18
How to Add Customer Rating Mixin in the Odoo 18How to Add Customer Rating Mixin in the Odoo 18
How to Add Customer Rating Mixin in the Odoo 18
Celine George
 
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
How To Open The Form View Of Many2many Clicking Tag In Odoo 18How To Open The Form View Of Many2many Clicking Tag In Odoo 18
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
Celine George
 
The Types of Charts in Odoo 18 Spreadsheet
The Types of Charts in Odoo 18 SpreadsheetThe Types of Charts in Odoo 18 Spreadsheet
The Types of Charts in Odoo 18 Spreadsheet
Celine George
 
How to Translate Odoo 18 Website in Any Language with AI
How to Translate Odoo 18 Website in Any Language with AIHow to Translate Odoo 18 Website in Any Language with AI
How to Translate Odoo 18 Website in Any Language with AI
Celine George
 
How to Manage Work Order Dependencies in Odoo 17 Manufacturing
How to Manage Work Order Dependencies in Odoo 17 ManufacturingHow to Manage Work Order Dependencies in Odoo 17 Manufacturing
How to Manage Work Order Dependencies in Odoo 17 Manufacturing
Celine George
 
Ad

Recently uploaded (20)

Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Diabetic neuropathy peripheral autonomic
Diabetic neuropathy peripheral autonomicDiabetic neuropathy peripheral autonomic
Diabetic neuropathy peripheral autonomic
Pankaj Patawari
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
High Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptxHigh Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptx
Ayush Srivastava
 
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd yearVitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
ARUN KUMAR
 
Envenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptxEnvenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptx
rekhapositivity
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-26-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-26-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-26-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-26-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Studying Drama: Definition, types and elements
Studying Drama: Definition, types and elementsStudying Drama: Definition, types and elements
Studying Drama: Definition, types and elements
AbdelFattahAdel2
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Unit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its typesUnit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its types
bharath321164
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Diabetic neuropathy peripheral autonomic
Diabetic neuropathy peripheral autonomicDiabetic neuropathy peripheral autonomic
Diabetic neuropathy peripheral autonomic
Pankaj Patawari
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
High Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptxHigh Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptx
Ayush Srivastava
 
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd yearVitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
ARUN KUMAR
 
Envenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptxEnvenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptx
rekhapositivity
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Studying Drama: Definition, types and elements
Studying Drama: Definition, types and elementsStudying Drama: Definition, types and elements
Studying Drama: Definition, types and elements
AbdelFattahAdel2
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Unit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its typesUnit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its types
bharath321164
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Ad

How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18

  • 1. How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18 Enterprise
  • 2. Enterprise Introduction In the Odoo backend, Kanban views offer an intuitive, visual way of managing tasks, projects, and workflows. Kanban views are just like a card type of rectangular view which we can get the major details of the model in which it is designed. We can also create our own new kanban views using codes. Here, we can discuss about how to open a wizard that appears upon clicking a Kanban tile. For that, there are some steps like creating a custom model for storing data, creating the model for the wizard, designing a kanban model for the custom model, making the wizard to open on the kanban click.
  • 3. Enterprise Using the Odoo 18, let’s create a model called ‘student.student using the code below. And create the necessary views and menus needed. from odoo import fields, models class Student(models.Model): _name = 'student.student' name = fields.Char("Student Name") class_name = fields.Char("Class") roll_no = fields.Char("Roll Number") image = fields.Binary("Image File") tag_ids = fields.Many2many('crm.tag', 'student_tag_rel', 'student_id', 'tag_id', string='Tags')
  • 4. Enterprise Now, under the wizards directory, create a wizard using the Transient Model as it does not need the data to get stored. from odoo import fields, models class ApproveStudent(models.TransientModel): _name = 'approve.student' name = fields.Char("Student Name") class_name = fields.Char("Class") roll_no = fields.Char("Roll Number") def approve(self): student = self.env['student.student'].browse(self.env.context.get('active_id')) student.write({'state':'student'}) Here, we defined the method approve() which changes the current active student record to Student state. Don’t forget to set the access right for the wizard in the security directory.
  • 5. Enterprise Define the form view for the wizard also and mention that xml file name in the data key of manifest of the module. <record id="approve_student_view_form" model="ir.ui.view"> <field name="name">approve.student.view.form</field> <field name="model">approve.student</field> <field name="arch" type="xml"> <form string="Select the Type"> <sheet><group> <group> <field name="name"/> <field name="class_name"/> <field name="roll_no"/> </group></group> <footer> <button name="approve" type="object" string="Convert"/> <button string="Cancel" class="btn-default" special="cancel" /> </footer> </sheet> </form> </field> </record>
  • 6. Enterprise Now, we need to define a simple kanban view for the custom model student.student as <record id="student_student_view_kanban" model="ir.ui.view"> <field name="name">student.student.kanban</field> <field name="model">student.student</field> <field name="priority">1</field> <field name="arch" type="xml"> <kanban class="o_kanban_mobile" action="action_open_wiz" type="object"> <templates> <t t-name="card" class="row g-0"> <div class="col-6"> Name :<field class="fw-bolder" name="name"/><br/> Class: <field class="fw-bolder" name="class_name"/> <field name="tag_ids" string="Tags" widget="many2many_tags"/> </div> <div class="col-6"> <field name="image" widget="image" class="oe_avatar"/> </div></t> </templates> </kanban> </field> </record>
  • 7. Enterprise In the previous kanban view code we defined it like <kanban class="o_kanban_mobile" action="action_open_wiz" type="object"> This action attribute of kanban tag decides that there is a click action to be performed. So, we define the method action_open_wiz in the student.student model.
  • 8. Enterprise The code for action_open_wiz is as def action_open_wiz(self): for rec in self: res = { 'type': 'ir.actions.act_window', 'view_mode': 'form', 'res_model': 'approve.student', 'target': 'new', 'context': { 'default_name': rec.name, 'default_class_name': rec.class_name, 'default_roll_no': rec.roll_no } } return res This simply opens the earlier defined wizard’s form view with all the fields prefilled with the currently active student record.
  • 9. Enterprise As a demo, the kanban view’s click on the second kanban tile will show like The marked button Convert is assigned with the action approve which does the state change of the selected student
  • 10. Enterprise So, in short, the action attribute of the kanban tag of a kanban view for any model is used to trigger a function on clicking it. Here in this slide, we used to open a custom wizard to open with this method. In this way, in Odoo 18, we can open a wizard when clicking on the Kanban Tile so easily.
  • 11. 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