I'm new to Odoo development, so please bear with me. I've been searching for answers and trying to read as much documentation as possible, but I'm under time constraints and that's why I'm reaching out to see if any experienced developers can at least point me in the right direction, or tell me that what I'm trying to do isn't possible.
I'm working on an eCommerce website, which is using Odoo 13 Enterprise Edition hosted by Odoo (SaaS.) I've created a custom module to implement new features on the website, but found that the Odoo SaaS hosting will not allow me to upload a module that edits any Python files. I've been editing QWeb files and SCSS files to change the appearance of the site, but I'm trying to add custom functionality to the website (like product filtering, etc.) and I keep running into the same problem: not being able to edit Python controllers is very limiting.
I've found documentation on the RPC API and started trying to use RPC calls in my module to create a search bar, similar to the built-in search bar (that shows the top 5 search results in a dropdown menu.) I want to be able to search the product description AND the product title to find my search term. It appears that the built-in search bar only searches the product title.
I found the module for the built-in search bar, and it uses a controller (I hope I'm using the correct terminology here) at the path: /shop/products/autocomplete
. I attempted to rebuild the search bar using RPC calls instead of fetching the search results using this controller and it works fine for users that are logged-in to the website, but throws a session error when an anonymous user attempts to use the search bar. I did some research and it appears that you cannot use RPC calls as an anonymous user.
I'm stuck trying to figure out how to make this happen.
Is there a way to edit the existing controller (at /shop/products/autocomplete
) to include the product description when it filters the search results using JavaScript? OR is it possible to use an RPC call to return filtered search results as an anonymous user?