Community mailing list archives

group by and totals

Argiris Gerogiannis
- 11/22/2015 03:10:21
Hello Community,

I would like to have a search view to show group by filtered columns of clients in a custom module, but also showing for the grouped lines the total of income/expensess of them.
Below is my snippet:

      <record id="view_expense_line_filter_1" model="ir.ui.view">
          <field name="name">fmsexpensess.filter</field>
          <field name="model">fmsexpensess.expense</field>
          <field name="arch" type="xml">
            <search string="Search Expenses Custom 1">
                <group string="Group By">
                   <filter name="group_by_clientID" string="Client" context="{'group_by': 'client_id'}" />
                   <filter name="group_by_supplier" string="Supplier" context="{'group_by': 'expArmsRentalCompanyAgents'}" />

I am using a field expTotalExpenses which is the one I need to be shown as sum of the grouped by lines.
Any help?

Thank you