Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3101 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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.