跳至內容
選單
此問題已被標幟
2 回覆
5394 瀏覽次數

How can I display the average of the speed field, instead of the sum?

XML TREE

        <field name="arch" type="xml">
            <tree string="Models">
                <field name="deviceid" />
                <field name="devicetime"/>
                <field name="speed"/>
                <field name="address" />
                <field name="event" />
                <field name="leido" />
            </tree>
        </field>


XML SEARCH

        <field name="arch" type="xml">
            <search string="Vehicles costs" >
                <group expand="1" string="Group By">
                    <filter name="groupby_devieid" separator="1" context="{'group_by' : 'deviceid'}" string="Vehicle"/>
                </group>
            </search>
        </field>

頭像
捨棄
作者 最佳答案

All records

Car 1
50
Car 1
60
Car 2
65


Grouped records

Car 1
55 (avg 50,60)  I need
Car 2
65




頭像
捨棄
最佳答案

Hi,

Try like thi by giving avg=""

<field name="probability" avg="Avg. of Probability"/>

See:-  https://www.youtube.com/watch?v=hMQaPyzIP6E

Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 24
1746
0
5月 24
1749
1
4月 22
9382
2
10月 21
8668
1
7月 21
22612