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

Problem to perform a search with a group by on a new field.

By
Tarik Srhiar
on 6/25/13, 7:25 AM 690 views

Hi eveybody,

I created a new field of char : fieldx ( Value1, Value2, ...) in purchase.order view, When I try to perform a group by on this field in purchase.order.tree I have the following result :

Value1 (0)

Value2 (0)

Instead of (0), we should have the number of lines for which value of fieldx equal Value1. Idem for Value2. In my case it should be Value1(2), Value2(4).

I think I am missing something, and thank's in advance for your help.

Best regards.

1

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 6/25/13, 8:59 AM

hi,

add x_value1 and x_value2 in view Tree.

and Edit search view to add :

<filter string="x_value1" domain="[]" context="{'group_by':'x_value1'}"/>
<filter string="x_value2"  domain="[]" context="{'group_by':'x_value2'}"/>

it must be working

Thank you for your help. As I was creating my field through a python and xml files, the problem was due to a wrong syntax.

Tarik Srhiar
on 6/25/13, 11:10 PM

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

0 follower(s)

Stats

Asked: 6/25/13, 7:25 AM
Seen: 690 times
Last updated: 3/16/15, 8:10 AM