odooodoo-15odoo-websiteodoo-product-configurator

How to make custom field searchable in website_sale in Odoo v15?


So I have created a number of custom fields on Inventory -> Products by adding the fields and then modifying the View from Developer mode.

Furthermore, I made those fields searchable inside the Oddo backend (in both Inventory -> Products and Website -> Products pages).

But, I cannot figure out how to make those custom fields searchable in the Website itself. So, on the website I have a Shop page that searches by title, description, etc and allows me to Filter on price, etc. But I need it to search on my custom fields.

For example, I have a custom field named "Anno" with id of "x_anno", which is added to forms like

<field name="x_anno" />

Anno = year so I want products made in 2011 if someone types "2011" in Search on the Website -> Shop

How do I pull that off? Any pointers?

Thanks in advance


Solution

  • I am writing this answer for future reference:

    Writing ODOO Apps and modules is the right way to go for this. I made a mistake of modifying the Views from Developer mode, which is the wrong approach. Right approach is creating the Odoo module, and there are plenty of resources for that online, i.e. https://webkul.com/blog/how-to-create-a-module-in-odoo/

    Once you write your module and install it into Odoo, it offers a whole new access to changes and modifications, which surely would not be available via simple View editing.

    Since I wrote this question, struggling with the basic task, I've managed to:

    And finally I got a good grasp of how Odoo internally works

    TLDR; Go for Odoo modules instead of simple View editing from developer mode