Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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="inherit_id" ref="product.product_search_form_view" />
<field name="arch" type="xml">
<field name="name" position="before">
<filter string="Has Quantity" name="qty_avail" domain="[('qty_available','!=',0)]" />
<record model="ir.actions.act_window" id="action_product_custom_form">
<field name="search_view_id" ref="product_search_form_custom"/>
<field name="view_id" ref="product_search_tree"/>
Is your field "qty_avail" a functional one? is it stored to database ?
If it is saved in the database then it will work without changes...
But if it is a functional field where value is not stored in database, then you must write "fnct_search" attribute.. which will help in search process....
Check this Doc: Functional Fields
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/8/14, 1:07 AM|
|Seen: 1306 times|
|Last updated: 3/28/17, 4:15 AM|