I have a customized tree view that can be accessed from my customized action window.
I would like to set default search for a text "/Stock" in the Many2One field Location (location_id
) of model stock.quant
.
This is the desired result after clicking a menu that calls the customized action window.
Right now, I can only type the word in the search bar to get the result in the image. However, I want to make it happen automatically upon loading this page.
I tried <field name="context">{'search_default_location_id': '/Stock'}</field>
in my customized action window, but it gives me this error.
invalid input syntax for type integer: "/Stock" LINE 1: ...ROM "stock_location" WHERE "stock_location".id IN ('/Stock')
Since I created all of these menu, action window, and view, I can customize anywhere among these components.
How to achieve this goal?