I want to show only the products that has quantity
but this doesn't work:
my search view:
<record model="ir.ui.view" id="product_search_form_custom">
<field name="name">product_search_form_custom</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_search_form_view" />
<field name="type">search</field>
<field name="arch" type="xml">
<field name="name" position="before">
<filter string="Has Quantity" name="qty_avail" domain="[('qty_available','!=',0)]" />
</field>
</field>
</record>
my action:
<record model="ir.actions.act_window" id="action_product_custom_form">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_type">form</field>
<field name="context">{'search_default_qty_avail':True}</field>
<field name="search_view_id" ref="product_search_form_custom"/>
<field name="view_id" ref="product_search_tree"/>
</record>