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.
Hi Manuel Perez,
In the file main.py you can find the following lines of code:
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.
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: 12/18/14, 7:21 AM|
|Seen: 1135 times|
|Last updated: 3/16/15, 8:10 AM|