Odoo Help

3

How do I search products by barcode in products list view? [Closed]

By
saeed
on 5/10/13, 8:05 AM 4,773 views

The Question has been closed

by
Sudhir Arya (SA)
on 06/07/2013 06:07:01

Is there any way to search product using its barcode in products list view. It seems to be easy by modifying search view. I did it but without success any help is appreciated.

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?

Alex
on 6/6/13, 7:15 PM
6
Anas Taji
On 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..%

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

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

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

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

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?

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

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

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

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.

Alex
on 6/7/13, 12:48 AM
1
Dharmesh Rathod
On 6/7/13, 3:33 AM

Hi,

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

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

Alex
on 6/7/13, 12:03 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.

Register

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)

Stats

Asked: 5/10/13, 8:05 AM
Seen: 4773 times
Last updated: 9/21/16, 11:00 AM