Odoo Help


9 Answers

Anas Taji Jordan

--Anas Taji--
| 7 7 10
Amman, Jordan
--Anas Taji--

Skype: anas.taji-sw

Email: anas.taji@smartway-jo.com

Anas Taji Jordan
5/10/13, 11:07 PM

Salam Alaykom ;)

You can do it by activating the developer mode (About OpenERP->Activate Developer Mode), then navigate to Warehouse->Products->Products, from the debug menu choose 'Edit SearchView' and insert the following line of code as the first line in the view:

   <field name="ean13" string="EAN13" filter_domain="[('ean13','ilike',self)]"/>

This will answer your question. However, you can also show the ean13 as a column in the list view as well, from debug menu choose 'Edit TreeView' and insert the following line of code as the first line in the view:

   <field name="ean13"/>

Hope it Helps..%

saeed Switzerland
5/11/13, 12:09 AM

Dear Anas, Thanks a lot for the information. I modified the the first line and replaced the "default_code" with "ean13" so I can search for name and barcode. thank you

Smart Way Business Solutions, Anas Taji Jordan
5/11/13, 6:42 AM

You may want to mark the question as solved and give a vote up.. ;)

Alex Bulgaria
6/6/13, 7:16 PM

Fantastic!! However, is there a way to integrate EAN13 search into the default search term? I.e. OpenERP will automatically search through the EAN13 field without the need to select a sub-menu?

Smart Way Business Solutions, Anas Taji Jordan
6/6/13, 10:17 PM

Yes, by placing it as the first line in the search view..%

Alex Bulgaria
6/7/13, 12:48 AM

I understand, but I am now getting two drop-downs - the first is EAN, and the other is the default (name). Can it not be integrated into one, with the possibility of adding further fields if needs be? This is now somewhat of an issue as searching by name requires me to press down on the keyboard as it defaults to search by EAN.

What is the syntax to add search fields into one search result entry? I would be interested in searching other fields, which would result in many entries in the drop-down results list.

A 'global' product attribute search so to speak would be ideal.

Dharmesh Rathod India
6/7/13, 3:33 AM


You can do like this in search VIEW of product:

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

Email : info@acespritech.com
Skype : acespritech
Blog : acespritechblog.wordpress.com

1 Comment
Alex Bulgaria
6/7/13, 12:03 PM

Bang on!! I was wondering if two '|','|', were needed.. it seems to be the case. Are these OR operands?

Ask a Question
Keep Informed
1 follower(s)
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