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

Create a new 'group by' filter in a tree view

By
José
on 1/23/15, 8:13 AM 981 views

Hello, I have Odoo 8.

In the tree view of Warehouse -> All the operations -> Delivery orders, when I click on the search button I see the option to group by several criterias: state, order date, etc.

I want to add a new field to group by, how can I do this? (question 1) Also I try to add a field to search on, but not works (the search criteria not appears). My code is:

<record model="ir.ui.view" id="stock_picking_filter_search">
            <field name="name">stock.picking.tree.filter_search</field>
            <field name="model">stock.picking</field>
            <field name="arch" type="xml">
                <search>
                    <field name="metodo_de_entrega" string="Método de entrega" />
                </search>
            </field>
        </record>

What is my mistake? (question 2) Thanks!

0

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 1/23/15, 8:23 AM

Hi Jose ,

You missed this in your code.

<search>

<filter string="Método de entrega" domain="[]" context="{'group_by':'metodo_de_entrega'}"/>

</search>

By using filter tag only you can adda  filter to the search.i hope it will works

I try this, but not works. The filter not appears. How can I check that the search filter is appling in the tree view? I think that this is the problem...

José
on 1/23/15, 8:52 AM

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: 1/23/15, 8:13 AM
Seen: 981 times
Last updated: 3/16/15, 8:10 AM