SlideShare a Scribd company logo

Name Search() Function in Odoo 16

In Odoo, the name search function is used to search records of a model in a relational field with a partial value or with fields other than the record's default name. For instance, when searching records in a Many2one field, by default, when we type the record name, we can search and choose from the records that are already there.

1 of 13
Download to read offline
name_search() Function in Odoo 16
● name_search() is an Odoo ORM method that is responsible for searching
some specific record by some field values in a relational field.
● In Odoo, the name search function is used to search records of a model in a
relational field with a partial value or with fields other than the record's
default name. For instance, when searching records in a Many2one field, by
default, when we type the record name, we can search and choose from the
records that are already there. However, we may use the name_search
function to search using various parameters.
Let’s see an example in Odoo.
When we create a record in that form with a customer field, we can search
existing records when we type the customer’s name. Also, when we type the
phone number of the contact, we can search that particular record.
In this example, the phone number of the contact.
Copy this phone number and search in customer field,
here you can see no customer is found but using name_search function you can do this.
If we search in the customer’s field using this phone number, we can
get a list of contacts with this phone number. Also, you can see that
we can search using a partial value of name or phone number.
This property is achieved using the name search function.
Let’s see how the name search function is defined.
Name Search() Function in Odoo 16
The parameters of the function are:
name (str): The name pattern to match
args (list): Optional search domain to specify further restrictions
operator (str): domain operator for matching names,
such as 'like', ‘ilike’, ‘=’, etc.
limit (int): Optional to limit the maximum number of records to
be returned.
name_get_uid: To specify the user or to restrict users
Suppose we require that we also add an email address for searching
for customers. For that, we have to define a name search function in
"res.partner’ by inheriting the model.
By default, the value of args is given as None. We can provide the
conditions we need for the name search function as a domain and
append the args list inside the function.
Now we can search the contacts using the phone number.
Here is the result,
Check our company website
for related blogs and Odoo book.
Check our YouTube channel for
functional and technical videos in Odoo.
https://www.youtube.com/watch?v=ub4kLrTQVNk

Recommended

Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15Celine George
 
Odoo icon smart buttons
Odoo   icon smart buttonsOdoo   icon smart buttons
Odoo icon smart buttonsTaieb Kristou
 
How to Define One2Many Field in Odoo 15
 How to Define One2Many Field in Odoo 15 How to Define One2Many Field in Odoo 15
How to Define One2Many Field in Odoo 15Celine George
 
An in Depth Journey into Odoo's ORM
An in Depth Journey into Odoo's ORMAn in Depth Journey into Odoo's ORM
An in Depth Journey into Odoo's ORMOdoo
 
How to develop automated tests
How to develop automated testsHow to develop automated tests
How to develop automated testsOdoo
 
Odoo ORM Methods | Object Relational Mapping in Odoo15
Odoo ORM Methods | Object Relational Mapping in Odoo15 Odoo ORM Methods | Object Relational Mapping in Odoo15
Odoo ORM Methods | Object Relational Mapping in Odoo15 Celine George
 
How to Use Constraint and SQL Constraint in Odoo 15
How to Use Constraint and SQL Constraint in Odoo 15How to Use Constraint and SQL Constraint in Odoo 15
How to Use Constraint and SQL Constraint in Odoo 15Celine George
 
Updating Client Interface 'on change' @api.onchange in Odoo 15
Updating Client Interface 'on change' @api.onchange in Odoo 15Updating Client Interface 'on change' @api.onchange in Odoo 15
Updating Client Interface 'on change' @api.onchange in Odoo 15Celine George
 

More Related Content

What's hot

Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)sroo galal
 
Actions and menus in odoo 16
Actions and menus in odoo 16Actions and menus in odoo 16
Actions and menus in odoo 16Celine George
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonAhmed Salama
 
What is Computed Fields and @api Depends in Odoo 15
What is Computed Fields and @api Depends in Odoo 15What is Computed Fields and @api Depends in Odoo 15
What is Computed Fields and @api Depends in Odoo 15Celine George
 
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...Celine George
 
Deploying & Scaling your Odoo Server
Deploying & Scaling your Odoo ServerDeploying & Scaling your Odoo Server
Deploying & Scaling your Odoo ServerOdoo
 
Defining Kanban View in Odoo15 | Advanced Views
Defining Kanban View in Odoo15 | Advanced ViewsDefining Kanban View in Odoo15 | Advanced Views
Defining Kanban View in Odoo15 | Advanced ViewsCeline George
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructorsVineeta Garg
 
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 FrameworkOdoo
 
How to Define Many2many Field in Odoo 15
How to Define Many2many Field in Odoo 15How to Define Many2many Field in Odoo 15
How to Define Many2many Field in Odoo 15Celine George
 
What is Python Lambda Function? Python Tutorial | Edureka
What is Python Lambda Function? Python Tutorial | EdurekaWhat is Python Lambda Function? Python Tutorial | Edureka
What is Python Lambda Function? Python Tutorial | EdurekaEdureka!
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator OverloadingNilesh Dalvi
 
Object Relation Mapping in Odoo 16
Object Relation Mapping in Odoo 16Object Relation Mapping in Odoo 16
Object Relation Mapping in Odoo 16Celine George
 
Operators in python
Operators in pythonOperators in python
Operators in pythoneShikshak
 
How to Define Many2one Field in Odoo 15
How to Define Many2one Field in Odoo 15How to Define Many2one Field in Odoo 15
How to Define Many2one Field in Odoo 15Celine George
 
Node.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitterNode.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitterSimen Li
 
Model Fields in Odoo 15
 Model Fields in Odoo 15 Model Fields in Odoo 15
Model Fields in Odoo 15Celine George
 
Swift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming languageSwift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming languageHossam Ghareeb
 

What's hot (20)

Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)
 
Actions and menus in odoo 16
Actions and menus in odoo 16Actions and menus in odoo 16
Actions and menus in odoo 16
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
What is Computed Fields and @api Depends in Odoo 15
What is Computed Fields and @api Depends in Odoo 15What is Computed Fields and @api Depends in Odoo 15
What is Computed Fields and @api Depends in Odoo 15
 
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
 
Deploying & Scaling your Odoo Server
Deploying & Scaling your Odoo ServerDeploying & Scaling your Odoo Server
Deploying & Scaling your Odoo Server
 
Defining Kanban View in Odoo15 | Advanced Views
Defining Kanban View in Odoo15 | Advanced ViewsDefining Kanban View in Odoo15 | Advanced Views
Defining Kanban View in Odoo15 | Advanced Views
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 
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
 
How to Define Many2many Field in Odoo 15
How to Define Many2many Field in Odoo 15How to Define Many2many Field in Odoo 15
How to Define Many2many Field in Odoo 15
 
What is Python Lambda Function? Python Tutorial | Edureka
What is Python Lambda Function? Python Tutorial | EdurekaWhat is Python Lambda Function? Python Tutorial | Edureka
What is Python Lambda Function? Python Tutorial | Edureka
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
Python dictionary
Python   dictionaryPython   dictionary
Python dictionary
 
Python recursion
Python recursionPython recursion
Python recursion
 
Object Relation Mapping in Odoo 16
Object Relation Mapping in Odoo 16Object Relation Mapping in Odoo 16
Object Relation Mapping in Odoo 16
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
How to Define Many2one Field in Odoo 15
How to Define Many2one Field in Odoo 15How to Define Many2one Field in Odoo 15
How to Define Many2one Field in Odoo 15
 
Node.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitterNode.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitter
 
Model Fields in Odoo 15
 Model Fields in Odoo 15 Model Fields in Odoo 15
Model Fields in Odoo 15
 
Swift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming languageSwift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming language
 

Similar to Name Search() Function in Odoo 16

OSINT - Yandex Search
OSINT - Yandex SearchOSINT - Yandex Search
OSINT - Yandex SearchRaghav Bisht
 
Remedy_Web_Searches_and_Reporting.pdf
Remedy_Web_Searches_and_Reporting.pdfRemedy_Web_Searches_and_Reporting.pdf
Remedy_Web_Searches_and_Reporting.pdfAli
 
Naming Standards, Clean Code
Naming Standards, Clean CodeNaming Standards, Clean Code
Naming Standards, Clean CodeCleanestCode
 
What is Google search operators
What is Google search operatorsWhat is Google search operators
What is Google search operatorsAK DigiHub
 
AIResume Automated Generation Of Resume Work History
AIResume  Automated Generation Of Resume Work HistoryAIResume  Automated Generation Of Resume Work History
AIResume Automated Generation Of Resume Work HistoryLisa Garcia
 
(C language)we are going to combined structs, strings, and command.docx
(C language)we are going to combined structs, strings, and command.docx(C language)we are going to combined structs, strings, and command.docx
(C language)we are going to combined structs, strings, and command.docxajoy21
 
Python programming - Functions and list and tuples
Python programming - Functions and list and tuplesPython programming - Functions and list and tuples
Python programming - Functions and list and tuplesMalligaarjunanN
 
How to Make Sequence Number in Odoo 16
How to Make Sequence Number in Odoo 16How to Make Sequence Number in Odoo 16
How to Make Sequence Number in Odoo 16Celine George
 
Databases Credit
Databases CreditDatabases Credit
Databases Creditmrcarty
 
Api specification based function search engine using natural language query-S...
Api specification based function search engine using natural language query-S...Api specification based function search engine using natural language query-S...
Api specification based function search engine using natural language query-S...Sanif Sanif
 
GraphQL with Sangria
GraphQL with SangriaGraphQL with Sangria
GraphQL with SangriaKnoldus Inc.
 

Similar to Name Search() Function in Odoo 16 (20)

Python functions
Python   functionsPython   functions
Python functions
 
Boolean operators
Boolean operatorsBoolean operators
Boolean operators
 
OSINT - Yandex Search
OSINT - Yandex SearchOSINT - Yandex Search
OSINT - Yandex Search
 
Remedy_Web_Searches_and_Reporting.pdf
Remedy_Web_Searches_and_Reporting.pdfRemedy_Web_Searches_and_Reporting.pdf
Remedy_Web_Searches_and_Reporting.pdf
 
Naming Standards, Clean Code
Naming Standards, Clean CodeNaming Standards, Clean Code
Naming Standards, Clean Code
 
What is Google search operators
What is Google search operatorsWhat is Google search operators
What is Google search operators
 
Boolean Guidance
Boolean GuidanceBoolean Guidance
Boolean Guidance
 
Boolean guidance
Boolean guidanceBoolean guidance
Boolean guidance
 
Sameer
SameerSameer
Sameer
 
AIResume Automated Generation Of Resume Work History
AIResume  Automated Generation Of Resume Work HistoryAIResume  Automated Generation Of Resume Work History
AIResume Automated Generation Of Resume Work History
 
Feature Engineering in NLP.pdf
Feature Engineering in NLP.pdfFeature Engineering in NLP.pdf
Feature Engineering in NLP.pdf
 
(C language)we are going to combined structs, strings, and command.docx
(C language)we are going to combined structs, strings, and command.docx(C language)we are going to combined structs, strings, and command.docx
(C language)we are going to combined structs, strings, and command.docx
 
Python programming - Functions and list and tuples
Python programming - Functions and list and tuplesPython programming - Functions and list and tuples
Python programming - Functions and list and tuples
 
How to Make Sequence Number in Odoo 16
How to Make Sequence Number in Odoo 16How to Make Sequence Number in Odoo 16
How to Make Sequence Number in Odoo 16
 
functions new.pptx
functions new.pptxfunctions new.pptx
functions new.pptx
 
Python Functions.pptx
Python Functions.pptxPython Functions.pptx
Python Functions.pptx
 
Python Functions.pptx
Python Functions.pptxPython Functions.pptx
Python Functions.pptx
 
Databases Credit
Databases CreditDatabases Credit
Databases Credit
 
Api specification based function search engine using natural language query-S...
Api specification based function search engine using natural language query-S...Api specification based function search engine using natural language query-S...
Api specification based function search engine using natural language query-S...
 
GraphQL with Sangria
GraphQL with SangriaGraphQL with Sangria
GraphQL with Sangria
 

More from Celine George

Current User First Suggestion in Odoo 17
Current User First Suggestion in Odoo 17Current User First Suggestion in Odoo 17
Current User First Suggestion in Odoo 17Celine George
 
How Can We Confirm a Dialogue Box in Odoo 17
How Can  We Confirm a Dialogue Box in Odoo 17How Can  We Confirm a Dialogue Box in Odoo 17
How Can We Confirm a Dialogue Box in Odoo 17Celine George
 
Multi - checkbox Attribute in the Odoo 17
Multi - checkbox Attribute in the Odoo 17Multi - checkbox Attribute in the Odoo 17
Multi - checkbox Attribute in the Odoo 17Celine George
 
How To Create Record Rules in the Odoo 17
How To Create Record Rules in the Odoo 17How To Create Record Rules in the Odoo 17
How To Create Record Rules in the Odoo 17Celine George
 
Add Products From Catalog in Odoo 17 Sales
Add Products From Catalog in Odoo 17 SalesAdd Products From Catalog in Odoo 17 Sales
Add Products From Catalog in Odoo 17 SalesCeline George
 
New Features in the Odoo 17 Sales Module
New Features in  the Odoo 17 Sales ModuleNew Features in  the Odoo 17 Sales Module
New Features in the Odoo 17 Sales ModuleCeline George
 
Subscription Pause Cancel in Odoo 17
Subscription Pause Cancel in Odoo 17Subscription Pause Cancel in Odoo 17
Subscription Pause Cancel in Odoo 17Celine George
 
How To Create Calendar View In Odoo 16
How To Create Calendar View In Odoo 16How To Create Calendar View In Odoo 16
How To Create Calendar View In Odoo 16Celine George
 
Model Attribute - _description
Model Attribute - _descriptionModel Attribute - _description
Model Attribute - _descriptionCeline George
 
Model Attribute - _transient
Model Attribute - _transientModel Attribute - _transient
Model Attribute - _transientCeline George
 
Model Attribute - _order
Model Attribute - _orderModel Attribute - _order
Model Attribute - _orderCeline George
 
Down Payments In Odoo 16 Sales
Down Payments In Odoo 16 SalesDown Payments In Odoo 16 Sales
Down Payments In Odoo 16 SalesCeline George
 
How to empty an One2many field in Odoo
How to empty an One2many field in OdooHow to empty an One2many field in Odoo
How to empty an One2many field in OdooCeline George
 
Configure Project in Odoo 16
Configure Project in Odoo 16Configure Project in Odoo 16
Configure Project in Odoo 16Celine George
 
Model Constraints In Odoo 16
Model Constraints In Odoo 16Model Constraints In Odoo 16
Model Constraints In Odoo 16Celine George
 
Quick Tips in Odoo 16
Quick Tips in Odoo 16Quick Tips in Odoo 16
Quick Tips in Odoo 16Celine George
 
Model Fields in Odoo 16
Model Fields in Odoo 16Model Fields in Odoo 16
Model Fields in Odoo 16Celine George
 
Building a Module in Odoo 16
Building a Module in Odoo 16Building a Module in Odoo 16
Building a Module in Odoo 16Celine George
 
Module Structure in Odoo 16
Module Structure in Odoo 16Module Structure in Odoo 16
Module Structure in Odoo 16Celine George
 
Composition of a Module in Odoo 16
Composition of a Module in Odoo 16Composition of a Module in Odoo 16
Composition of a Module in Odoo 16Celine George
 

More from Celine George (20)

Current User First Suggestion in Odoo 17
Current User First Suggestion in Odoo 17Current User First Suggestion in Odoo 17
Current User First Suggestion in Odoo 17
 
How Can We Confirm a Dialogue Box in Odoo 17
How Can  We Confirm a Dialogue Box in Odoo 17How Can  We Confirm a Dialogue Box in Odoo 17
How Can We Confirm a Dialogue Box in Odoo 17
 
Multi - checkbox Attribute in the Odoo 17
Multi - checkbox Attribute in the Odoo 17Multi - checkbox Attribute in the Odoo 17
Multi - checkbox Attribute in the Odoo 17
 
How To Create Record Rules in the Odoo 17
How To Create Record Rules in the Odoo 17How To Create Record Rules in the Odoo 17
How To Create Record Rules in the Odoo 17
 
Add Products From Catalog in Odoo 17 Sales
Add Products From Catalog in Odoo 17 SalesAdd Products From Catalog in Odoo 17 Sales
Add Products From Catalog in Odoo 17 Sales
 
New Features in the Odoo 17 Sales Module
New Features in  the Odoo 17 Sales ModuleNew Features in  the Odoo 17 Sales Module
New Features in the Odoo 17 Sales Module
 
Subscription Pause Cancel in Odoo 17
Subscription Pause Cancel in Odoo 17Subscription Pause Cancel in Odoo 17
Subscription Pause Cancel in Odoo 17
 
How To Create Calendar View In Odoo 16
How To Create Calendar View In Odoo 16How To Create Calendar View In Odoo 16
How To Create Calendar View In Odoo 16
 
Model Attribute - _description
Model Attribute - _descriptionModel Attribute - _description
Model Attribute - _description
 
Model Attribute - _transient
Model Attribute - _transientModel Attribute - _transient
Model Attribute - _transient
 
Model Attribute - _order
Model Attribute - _orderModel Attribute - _order
Model Attribute - _order
 
Down Payments In Odoo 16 Sales
Down Payments In Odoo 16 SalesDown Payments In Odoo 16 Sales
Down Payments In Odoo 16 Sales
 
How to empty an One2many field in Odoo
How to empty an One2many field in OdooHow to empty an One2many field in Odoo
How to empty an One2many field in Odoo
 
Configure Project in Odoo 16
Configure Project in Odoo 16Configure Project in Odoo 16
Configure Project in Odoo 16
 
Model Constraints In Odoo 16
Model Constraints In Odoo 16Model Constraints In Odoo 16
Model Constraints In Odoo 16
 
Quick Tips in Odoo 16
Quick Tips in Odoo 16Quick Tips in Odoo 16
Quick Tips in Odoo 16
 
Model Fields in Odoo 16
Model Fields in Odoo 16Model Fields in Odoo 16
Model Fields in Odoo 16
 
Building a Module in Odoo 16
Building a Module in Odoo 16Building a Module in Odoo 16
Building a Module in Odoo 16
 
Module Structure in Odoo 16
Module Structure in Odoo 16Module Structure in Odoo 16
Module Structure in Odoo 16
 
Composition of a Module in Odoo 16
Composition of a Module in Odoo 16Composition of a Module in Odoo 16
Composition of a Module in Odoo 16
 

Recently uploaded

Andreas Schleicher_ Strengthening Upper Secondary Education in Lithuania
Andreas Schleicher_ Strengthening Upper Secondary  Education in LithuaniaAndreas Schleicher_ Strengthening Upper Secondary  Education in Lithuania
Andreas Schleicher_ Strengthening Upper Secondary Education in LithuaniaEduSkills OECD
 
Plagiarism, Types & Consequences by Dr. Sarita Anand
Plagiarism, Types & Consequences by Dr. Sarita AnandPlagiarism, Types & Consequences by Dr. Sarita Anand
Plagiarism, Types & Consequences by Dr. Sarita AnandDr. Sarita Anand
 
天橋立 観光メモ 2024-30-302-2-Amanohashidate Sightseeing Memo.pptx
天橋立 観光メモ 2024-30-302-2-Amanohashidate Sightseeing Memo.pptx天橋立 観光メモ 2024-30-302-2-Amanohashidate Sightseeing Memo.pptx
天橋立 観光メモ 2024-30-302-2-Amanohashidate Sightseeing Memo.pptxMasami YASUDA
 
ICS2208 Lecture 2 Slides Interfaces_.pdf
ICS2208 Lecture 2 Slides Interfaces_.pdfICS2208 Lecture 2 Slides Interfaces_.pdf
ICS2208 Lecture 2 Slides Interfaces_.pdfVanessa Camilleri
 
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfSSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfMohonDas
 
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?Aggregage
 
Successful projects and failed programmes – the cost of not designing the who...
Successful projects and failed programmes – the cost of not designing the who...Successful projects and failed programmes – the cost of not designing the who...
Successful projects and failed programmes – the cost of not designing the who...Association for Project Management
 
Kartik Nair In Media Res Media Component
Kartik Nair In Media Res Media ComponentKartik Nair In Media Res Media Component
Kartik Nair In Media Res Media ComponentInMediaRes1
 
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...AKSHAYMAGAR17
 
2.27.24 Malcolm X and the Black Freedom Struggle.pptx
2.27.24 Malcolm X and the Black Freedom Struggle.pptx2.27.24 Malcolm X and the Black Freedom Struggle.pptx
2.27.24 Malcolm X and the Black Freedom Struggle.pptxMaryPotorti1
 
Permeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemPermeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemchetanpatil2572000
 
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...SUMIT TIWARI
 
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...EduSkills OECD
 
Understanding Canada's international higher education landscape (2024)
Understanding Canada's international higher education landscape (2024)Understanding Canada's international higher education landscape (2024)
Understanding Canada's international higher education landscape (2024)CaraSkikne1
 
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...i3 Health
 
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in GhanaDecision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in GhanaPrince Armah, PhD
 
Learner Digital Skills Toolkit DRAFT.docx
Learner Digital Skills Toolkit DRAFT.docxLearner Digital Skills Toolkit DRAFT.docx
Learner Digital Skills Toolkit DRAFT.docxGeorgeMilliken2
 
A Free eBook ~ Mental Exercise ...Puzzles to Analyze.pdf
A Free eBook ~ Mental Exercise ...Puzzles to Analyze.pdfA Free eBook ~ Mental Exercise ...Puzzles to Analyze.pdf
A Free eBook ~ Mental Exercise ...Puzzles to Analyze.pdfOH TEIK BIN
 
Digital Footprints to Career Pathways - Building a Strong Professional Online...
Digital Footprints to Career Pathways - Building a Strong Professional Online...Digital Footprints to Career Pathways - Building a Strong Professional Online...
Digital Footprints to Career Pathways - Building a Strong Professional Online...Sue Beckingham
 

Recently uploaded (20)

Andreas Schleicher_ Strengthening Upper Secondary Education in Lithuania
Andreas Schleicher_ Strengthening Upper Secondary  Education in LithuaniaAndreas Schleicher_ Strengthening Upper Secondary  Education in Lithuania
Andreas Schleicher_ Strengthening Upper Secondary Education in Lithuania
 
Plagiarism, Types & Consequences by Dr. Sarita Anand
Plagiarism, Types & Consequences by Dr. Sarita AnandPlagiarism, Types & Consequences by Dr. Sarita Anand
Plagiarism, Types & Consequences by Dr. Sarita Anand
 
天橋立 観光メモ 2024-30-302-2-Amanohashidate Sightseeing Memo.pptx
天橋立 観光メモ 2024-30-302-2-Amanohashidate Sightseeing Memo.pptx天橋立 観光メモ 2024-30-302-2-Amanohashidate Sightseeing Memo.pptx
天橋立 観光メモ 2024-30-302-2-Amanohashidate Sightseeing Memo.pptx
 
CLUBE PERLINGUAS .
CLUBE PERLINGUAS                        .CLUBE PERLINGUAS                        .
CLUBE PERLINGUAS .
 
ICS2208 Lecture 2 Slides Interfaces_.pdf
ICS2208 Lecture 2 Slides Interfaces_.pdfICS2208 Lecture 2 Slides Interfaces_.pdf
ICS2208 Lecture 2 Slides Interfaces_.pdf
 
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfSSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
 
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
 
Successful projects and failed programmes – the cost of not designing the who...
Successful projects and failed programmes – the cost of not designing the who...Successful projects and failed programmes – the cost of not designing the who...
Successful projects and failed programmes – the cost of not designing the who...
 
Kartik Nair In Media Res Media Component
Kartik Nair In Media Res Media ComponentKartik Nair In Media Res Media Component
Kartik Nair In Media Res Media Component
 
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
 
2.27.24 Malcolm X and the Black Freedom Struggle.pptx
2.27.24 Malcolm X and the Black Freedom Struggle.pptx2.27.24 Malcolm X and the Black Freedom Struggle.pptx
2.27.24 Malcolm X and the Black Freedom Struggle.pptx
 
Permeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemPermeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery system
 
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
 
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
 
Understanding Canada's international higher education landscape (2024)
Understanding Canada's international higher education landscape (2024)Understanding Canada's international higher education landscape (2024)
Understanding Canada's international higher education landscape (2024)
 
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
 
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in GhanaDecision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
 
Learner Digital Skills Toolkit DRAFT.docx
Learner Digital Skills Toolkit DRAFT.docxLearner Digital Skills Toolkit DRAFT.docx
Learner Digital Skills Toolkit DRAFT.docx
 
A Free eBook ~ Mental Exercise ...Puzzles to Analyze.pdf
A Free eBook ~ Mental Exercise ...Puzzles to Analyze.pdfA Free eBook ~ Mental Exercise ...Puzzles to Analyze.pdf
A Free eBook ~ Mental Exercise ...Puzzles to Analyze.pdf
 
Digital Footprints to Career Pathways - Building a Strong Professional Online...
Digital Footprints to Career Pathways - Building a Strong Professional Online...Digital Footprints to Career Pathways - Building a Strong Professional Online...
Digital Footprints to Career Pathways - Building a Strong Professional Online...
 

Name Search() Function in Odoo 16

  • 2. ● name_search() is an Odoo ORM method that is responsible for searching some specific record by some field values in a relational field. ● In Odoo, the name search function is used to search records of a model in a relational field with a partial value or with fields other than the record's default name. For instance, when searching records in a Many2one field, by default, when we type the record name, we can search and choose from the records that are already there. However, we may use the name_search function to search using various parameters.
  • 3. Let’s see an example in Odoo.
  • 4. When we create a record in that form with a customer field, we can search existing records when we type the customer’s name. Also, when we type the phone number of the contact, we can search that particular record. In this example, the phone number of the contact.
  • 5. Copy this phone number and search in customer field,
  • 6. here you can see no customer is found but using name_search function you can do this.
  • 7. If we search in the customer’s field using this phone number, we can get a list of contacts with this phone number. Also, you can see that we can search using a partial value of name or phone number. This property is achieved using the name search function. Let’s see how the name search function is defined.
  • 9. The parameters of the function are: name (str): The name pattern to match args (list): Optional search domain to specify further restrictions operator (str): domain operator for matching names, such as 'like', ‘ilike’, ‘=’, etc. limit (int): Optional to limit the maximum number of records to be returned. name_get_uid: To specify the user or to restrict users
  • 10. Suppose we require that we also add an email address for searching for customers. For that, we have to define a name search function in "res.partner’ by inheriting the model. By default, the value of args is given as None. We can provide the conditions we need for the name search function as a domain and append the args list inside the function.
  • 11. Now we can search the contacts using the phone number.
  • 12. Here is the result,
  • 13. Check our company website for related blogs and Odoo book. Check our YouTube channel for functional and technical videos in Odoo. https://www.youtube.com/watch?v=ub4kLrTQVNk