Odoo Help


record and search product description

on 8/5/16, 3:11 AM 912 views

I wonder to know how I can have both Partnumber and product description in Odoo product and search them

as and example assume I have a disk which its partnumber is:


and its description is:

Samsung SSD SM863, 240GB, SATA 6Gb/s, VNAND, 2.5", 7.0mm, 19nm (3.6 DWPD) w/SED

and I want my users to be able to search by putting "SSD" 


Pinakin Nayi (pna)

--Pinakin Nayi (pna)--
| 2 1 5
Ahmedabad, India
--Pinakin Nayi (pna)--

He has good skills in problem identification and implementation of effective solutions. He is working in RD India validation team.

Skype: pinakinerp

LinkedIn : https://www.linkedin.com/in/pinakin-nayi-2a33103a/


Pinakin Nayi (pna)
On 8/5/16, 8:56 AM

You can improve search view and filter domain like below,

 <field name="name" string="Product" filter_domain="['|',('name','ilike',self),('description','ilike',self)"/>

Thank you Pinakin for your hint

as I'm pretty new to Odoo, I tool you comment and searched around that to come up with the final solution

for those who might get to this question, I'm writing down my steps:

- Actually, my description was in notes and in the "Description for Quotations"

- first I needed to find the name of this field in the model. clicked on help icon on the top right corner then "About" and then clicked on "Activate the developer mode" and its colored turned into blue

- went to Purchase (or where ever the item is) and clicked on the product and open a product and entered in the edit mode and then change to the "Note" tab and put the mouse cursor on the text box. The field name appeared: description_sale. Also, I found the object name (which this field was related to) there: "product.template"

- went to settings (top bar), technical, user interface, views

-serached for "product.template" (when type "product.template" in the search box, the second item searches based on objects)

- in the result page, there were a few views from the type of "Search". I realized that "product.template.search" was the main search view which other product search views were inherited from. (click on it and check "inherited views" and you would see)

- I decided to modify the main search view so all other views would have this option. selected architecture tab and clicked edit

this was the main line for the product search there:

<field name="name" string="Product" filter_domain="['|',('default_code','ilike',self),('name','ilike',self)]"/>

I added the below line

<field name="name" string="Description" filter_domain="['|','|',('default_code','ilike',self),('name','ilike',self),('description_sale','ilike',self)]"/>

(attention to the format of '|' operator. still I have not found a solid document on this, but this link was helpful http://stackoverflow.com/questions/32463585/odoo-searching-multiple-custom-fields-with-one-string)


-refresh page

- put someting in the note->"Description for Quotations"

- go to products page and put something in the search box and select the second row (Description) and it will search both name and description

on 8/5/16, 10:25 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/5/16, 3:11 AM
Seen: 912 times
Last updated: 3/28/17, 4:11 AM