Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3124 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.