Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
5450 Visninger

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>

Avatar
Kassér
Forfatter Bedste svar

All records

Car 1
50
Car 1
60
Car 2
65


Grouped records

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




Avatar
Kassér
Bedste svar

Hi,

Try like thi by giving avg=""

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

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

Thanks

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
jul. 24
1772
0
maj 24
1817
1
apr. 22
9447
2
okt. 21
8771
1
jul. 21
22745