To create a filters in OpenErp,
First install product module and inherit view of product module and use filtering for particular fields and create filter in your own module. For example use this below code in .xml file
<record id="rent_product_search_form_view" model="ir.ui.view">
<field name="name">product.search.form</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">
<filter string="Can be Sold" position="after">
<filter string="To Rent" icon="terp-accessories-archiver+"
name="rent" domain="[('can_be_rent', '=', 1)]"/>
</filter>
</field>
</record>
0 Comment(s)