Odoo Help

Welcome!

This community 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.

0

How to add search by group

By
oussama
on 10/17/14, 4:48 AM 371 views

Hi

How to add search by group in product

my code

<record id="product_myform_search" model="ir.ui.view">
            <field name="name">product.myform.search</field>
            <field name="model">product.product</field>
            <field name="type">search</field>
            <field name="inherit_id" ref="product.product_search_form_view" />
            <field name="arch" type="xml">

                       <xpath expr="/search[@string='Product']/group[2]/filter[@string='Category']" position="after">
                              <filter string="Famille"  icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'mfamille'}"/>
                              <filter string="Sous famille" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'sfamille'}"/>
                        </xpath>  
                        
            </field>
        </record>

Thanks

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 10/17/14, 6:09 AM

Not quite clear what you mean to do. Do you want to add a filter or a group-by clause to the products? 

Note: In order to create a group-by, the field you will group by MUST exist in the tree view!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/17/14, 4:48 AM
Seen: 371 times
Last updated: 3/16/15, 8:10 AM