From the search bar of product now we can search using name of product, but my need is have to search with name or barcode. we can use advanced search barcode, to search a product using barcode. But i want to use only serch bar not advanced search. As per my knowledge i have to change "name_search" in produc.product. Please provide me that function code. correct me if i am wrong.
There is two way to achive your objective.
1) Keep product name and add barcode into search bar.
For this you have to just add "ean13" field into search view by inheriting product search view.
2) Replace product name with Barcode into search bar.
For this you have to just replace "name" field with "ean13" field into search view by inheriting product search view.
U need to add your field name inside search view in .xml file.Lets consider an example:
<record id="view_my_product_filter" model="ir.ui.view">
<field name="arch" type="xml">
<search string="Search Me">
<field name="name" string="Product Name" />
<field name="my_barcode" string="Barcode"/>
So when you type smething on search bar ,a drop down list will appear. Select from the drop down list(product name,barcode) and hit enter.
Visit below link for better understanding
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 8/25/14, 1:27 AM|
|Seen: 2367 times|
|Last updated: 3/16/15, 8:10 AM|