|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<odoo> |
| 3 | + <record id="sale_commission_report_view_list" model="ir.ui.view"> |
| 4 | + <field name="name">sale.commission.report.view.list</field> |
| 5 | + <field name="model">commission.rule.line</field> |
| 6 | + <field name="arch" type="xml"> |
| 7 | + <list create="0" editable="top"> |
| 8 | + <field name="date"/> |
| 9 | + <field name="user_id"/> |
| 10 | + <field name="team_id" string="Team"/> |
| 11 | + <field name="move_id"/> |
| 12 | + <field name="amount"/> |
| 13 | + <field name="currency_id" column_invisible="True"/> |
| 14 | + </list> |
| 15 | + </field> |
| 16 | + </record> |
| 17 | + |
| 18 | + <record id="sale_commission_report_view_graph" model="ir.ui.view"> |
| 19 | + <field name="name">sale.commission.report.view.graph</field> |
| 20 | + <field name="model">commission.rule.line</field> |
| 21 | + <field name="arch" type="xml"> |
| 22 | + <graph> |
| 23 | + <field name="date" type="col"/> |
| 24 | + <field name="user_id" type="row"/> |
| 25 | + <field name="amount" type="measure"/> |
| 26 | + </graph> |
| 27 | + </field> |
| 28 | + </record> |
| 29 | + |
| 30 | + <record id="sale_commission_report_view_pivot" model="ir.ui.view"> |
| 31 | + <field name="name">sale.commission.report.view.pivot</field> |
| 32 | + <field name="model">commission.rule.line</field> |
| 33 | + <field name="arch" type="xml"> |
| 34 | + <pivot> |
| 35 | + <field name="date" type="col"/> |
| 36 | + <field name="user_id" type="row"/> |
| 37 | + <field name="team_id" type="row"/> |
| 38 | + <field name="amount" type="measure"/> |
| 39 | + </pivot> |
| 40 | + </field> |
| 41 | + </record> |
| 42 | + |
| 43 | + <record id="sale_commission_report_view_search" model="ir.ui.view"> |
| 44 | + <field name="name">sale.commission.report.view.search</field> |
| 45 | + <field name="model">commission.rule.line</field> |
| 46 | + <field name="arch" type="xml"> |
| 47 | + <search string="Commission Report"> |
| 48 | + <field name="user_id"/> |
| 49 | + <field name="team_id"/> |
| 50 | + <field name="commission_rule_id"/> |
| 51 | + <filter string="My commission" name="my" |
| 52 | + domain="[('user_id', '=', uid)]"/> |
| 53 | + <filter string="Date" name="filter_date" |
| 54 | + date="date"/> |
| 55 | + |
| 56 | + <group string="Group By"> |
| 57 | + <filter string="Salesperson" |
| 58 | + name="group_by_salesperson" |
| 59 | + context="{'group_by':'user_id'}"/> |
| 60 | + <filter string="Sales Team" |
| 61 | + name="group_by_salesteam" |
| 62 | + context="{'group_by':'team_id'}"/> |
| 63 | + <filter string="Date" |
| 64 | + name="group_by_date" |
| 65 | + context="{'group_by':'date'}"/> |
| 66 | + </group> |
| 67 | + </search> |
| 68 | + </field> |
| 69 | + </record> |
| 70 | + |
| 71 | + <record id="sale_commission_action_report" model="ir.actions.act_window"> |
| 72 | + <field name="name">Commissions</field> |
| 73 | + <field name="res_model">commission.rule.line</field> |
| 74 | + <field name="view_mode">list,graph,pivot</field> |
| 75 | + <field name="context">{'search_default_my': True}</field> |
| 76 | + <field name="help" type="html"> |
| 77 | + <p class="o_view_nocontent_neutral_face"> |
| 78 | + Unfortunately, there are no commissions for you |
| 79 | + </p> |
| 80 | + <p> |
| 81 | + Ensure you are assigned to a commission rule and have made sales that qualify for commissions |
| 82 | + </p> |
| 83 | + </field> |
| 84 | + </record> |
| 85 | +</odoo> |
0 commit comments