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

I would like to define in xml (view and/or action parameters) a pivot view of leads, comparing the current year revenue with the previous year one , i.e. using the date filter and comparision with previous year.

That's because I would like to make the year dynamic (i.e. always comparing the current year with the previous year), I know i can save thes filter and recall it but it would always display the same years.


อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

It works for the filtering part, but it doesn't automatically apply the comparision feature.

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

Hi,

You can open the pivot view with action and add a dynamic filter to achieve what you require.

Here is an example which adds a dynamic filter on date.


<filter string="Today Activities"
        name="activities_today"
domain="[('activity_ids.date_deadline', '=',
context_today().strftime('%Y-%m-%d'))]"/>


Hope it helps

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 24
29
0
มี.ค. 20
1839
1
ธ.ค. 19
4507
1
มิ.ย. 25
561
0
ม.ค. 24
1666