Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3109 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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.