Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3115 Visualizzazioni

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.

Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona
Autore

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.