SlideShare a Scribd company logo
3
Most read
4
Most read
How to empty an One2many
field in Odoo
In this slide we are discussing how to empty a
one2many field in odoo 16.For that we are adding a
button named ‘DELETE RECORD’ .So on clicking
this button all the one2many records get
removed.So lets see how it can be done.
• In the xml i have added a button with name ‘delete_record’
• So on clicking this button below function is executed
• Here visa_approvals_ids is the one2many field.
• In this function we use [(5, 0, 0)] to delete all the records in the visa_approvals_ids.
• first we have records in the one2many field
• Then when we click the button all the records get deleted
• We also have other method to delete all the data from one2many.that is by using
unlink().Here we are updating the delete_record () as below:-
• This function also delete all the records from the one2many
• After updating the function just refresh the UI and click on the delete record button .Then
we can see all the records in the one2many has been deleted.
• So by using both [(5, 0, 0)] and unlink() we can delete the records in one2many.
Check our company website
for related blogs and Odoo book.
https://www.youtube.com/watch?v=sqkMIpdy7V0

More Related Content

PPTX
What is context? How to use context in Odoo by weblearns
PDF
Odoo - From v7 to v8: the new api
DOCX
QWeb Report in odoo
PDF
Manual Para Crear Carpetas Y Subir Archivos
PDF
midas NFX CFD Catalog
DOC
Silabus tik kelas 3
PPTX
Common Performance Pitfalls in Odoo apps
PPTX
Chapter 7 - Evaluation Tekhnique
What is context? How to use context in Odoo by weblearns
Odoo - From v7 to v8: the new api
QWeb Report in odoo
Manual Para Crear Carpetas Y Subir Archivos
midas NFX CFD Catalog
Silabus tik kelas 3
Common Performance Pitfalls in Odoo apps
Chapter 7 - Evaluation Tekhnique

What's hot (17)

PDF
Tab Review dan View pada Microsoft Word
PDF
Odoo - Business intelligence: Develop cube views for your own objects
PDF
Odoo - Smart buttons
PDF
Python - code quality and production monitoring
PDF
MODUL TUTORIAL POWERPOINT 2013
DOCX
PESTAÑA FORMULAS DE EXCEL
PPTX
How to add menu in Odoo 17 Website - Odoo 17 Slides
PDF
JS1.pdf
ODT
Microsoft power point (materi kls 3 semester 2 )
PDF
Ejercicios sobre Google drive (2017)
PDF
Diseño visual basic
DOCX
проект скретч
DOCX
інструкція створення блогу.
PPTX
Pengenalan Ms. Powerpoint 2007
PPT
Introducción a ms word clase 01
PDF
Latihan dan soal praktek Ms.Word
DOCX
Soal + jawaban PAT PBO Kelas XI RPL 2021.docx
Tab Review dan View pada Microsoft Word
Odoo - Business intelligence: Develop cube views for your own objects
Odoo - Smart buttons
Python - code quality and production monitoring
MODUL TUTORIAL POWERPOINT 2013
PESTAÑA FORMULAS DE EXCEL
How to add menu in Odoo 17 Website - Odoo 17 Slides
JS1.pdf
Microsoft power point (materi kls 3 semester 2 )
Ejercicios sobre Google drive (2017)
Diseño visual basic
проект скретч
інструкція створення блогу.
Pengenalan Ms. Powerpoint 2007
Introducción a ms word clase 01
Latihan dan soal praktek Ms.Word
Soal + jawaban PAT PBO Kelas XI RPL 2021.docx
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
A systematic review of self-coping strategies used by university students to ...
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Classroom Observation Tools for Teachers
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Presentation on HIE in infants and its manifestations
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Structure & Organelles in detailed.
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
A systematic review of self-coping strategies used by university students to ...
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Classroom Observation Tools for Teachers
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Pharma ospi slides which help in ospi learning
Presentation on HIE in infants and its manifestations
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Structure & Organelles in detailed.
Microbial disease of the cardiovascular and lymphatic systems
O7-L3 Supply Chain Operations - ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
VCE English Exam - Section C Student Revision Booklet
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
GDM (1) (1).pptx small presentation for students
O5-L3 Freight Transport Ops (International) V1.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?

How to empty an One2many field in Odoo

  • 1. How to empty an One2many field in Odoo
  • 2. In this slide we are discussing how to empty a one2many field in odoo 16.For that we are adding a button named ‘DELETE RECORD’ .So on clicking this button all the one2many records get removed.So lets see how it can be done.
  • 3. • In the xml i have added a button with name ‘delete_record’ • So on clicking this button below function is executed
  • 4. • Here visa_approvals_ids is the one2many field. • In this function we use [(5, 0, 0)] to delete all the records in the visa_approvals_ids. • first we have records in the one2many field
  • 5. • Then when we click the button all the records get deleted
  • 6. • We also have other method to delete all the data from one2many.that is by using unlink().Here we are updating the delete_record () as below:- • This function also delete all the records from the one2many
  • 7. • After updating the function just refresh the UI and click on the delete record button .Then we can see all the records in the one2many has been deleted. • So by using both [(5, 0, 0)] and unlink() we can delete the records in one2many.
  • 8. Check our company website for related blogs and Odoo book. https://www.youtube.com/watch?v=sqkMIpdy7V0