Odoo Help

Welcome!

This community 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.

1

Search option Shop?

By
Bas Meyer
on 12/18/14, 7:21 AM 1,166 views

Hello Odoo, 

I want to change the shop search option (website side) I want it to search in other tables too, so we can search on supplier names for example. 

I opened another question because i can't delete my own answers, but that one got locked because i had already opened this one. 


I would appreciate it, if there is somebody who can help me out with my problem.
Bas

Is there nobody who can help me?

Bas Meyer
on 12/19/14, 4:54 AM
2

Akhil P Sivan

--Akhil P Sivan--
3423
| 5 3 6
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 12/18/14, 7:49 AM

Yes you can add the field 'seller_ids' to the search view or you can include that field in filter_domain attribute of product name field.

1
Bas Meyer
On 12/18/14, 8:05 AM

Hi Manuel Perez, 

In the file main.py you can find the following lines of code: 

if search:
            domain += ['|', '|', '|', ('name', 'ilike', search), ('description', 'ilike', search),
                ('description_sale', 'ilike', search), ('product_variant_ids.default_code', 'ilike', search)] 

You can add extra fields in there, as long as their ID's are connected to the products tabel i believe. So, for example; you would like to search on the name of a reseller. 
You should add: seller_ids.name    

Hope i helped you. 

0
Manuel Pérez
On 1/13/15, 5:07 AM

Hi Bas - did you ever find a solution for this? I'd like to accomplish something similar

Hi Bas - how did you actually change the code? did you extend the existing class in the controller file or did you extend it? would you please share your code in this second case? Thanks.

Manuel Pérez
on 1/14/15, 1:00 PM

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 12/18/14, 7:21 AM
Seen: 1166 times
Last updated: 3/16/15, 8:10 AM