You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
3.0 KiB
70 lines
3.0 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Tree view of calculate.incentive -->
|
|
<record id="calculate_incentive_view_tree" model="ir.ui.view">
|
|
<field name="name">
|
|
calculate.incentive.view.tree.sales_incentive_calculation
|
|
</field>
|
|
<field name="model">calculate.incentive</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Incentive" create="false" import="false">
|
|
<field name="salesperson_id"/>
|
|
<field name="goal"/>
|
|
<field name="achieved"/>
|
|
<field name="achievement_percentage"/>
|
|
<field name="incentive"/>
|
|
<field name="start_date"/>
|
|
<field name="end_date"/>
|
|
<field name="status"/>
|
|
<field name="check" column_invisible="True"/>
|
|
<field name="date_check" column_invisible="True"/>
|
|
<button name="action_submit_to_accountant" type="object"
|
|
string="Submit for approval"
|
|
invisible="check or not date_check"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Form view of calculate.incentive -->
|
|
<record id="calculate_incentive_view_form" model="ir.ui.view">
|
|
<field name="name">
|
|
calculate.incentive.view.form.sales_incentive_calculation
|
|
</field>
|
|
<field name="model">calculate.incentive</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Incentive Approval">
|
|
<header>
|
|
<field name="check" invisible="1"/>
|
|
<button name="action_submit_to_accountant" type="object"
|
|
string="Submit to accountant" invisible="check"/>
|
|
<field name="status" widget="statusbar"
|
|
statusbar_visible="unpaid,submit,paid"/>
|
|
</header>
|
|
<sheet>
|
|
<group>
|
|
<field name="salesperson_id"
|
|
readonly="status == 'paid'"/>
|
|
<field name="goal" readonly="status == 'paid'"/>
|
|
<field name="achieved" readonly="status == 'paid'"/>
|
|
<field name="achievement_percentage"
|
|
readonly="status == 'paid'"/>
|
|
<field name="incentive" readonly="status == 'paid'"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Action for calculate.incentive -->
|
|
<record id="calculate_incentive_action" model="ir.actions.act_window">
|
|
<field name="name">Incentive Calculation</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">calculate.incentive</field>
|
|
<field name="view_mode">tree,pivot,form</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a new incentive setting.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|