[MIG] commission_simple to 18
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
{
|
||||
'name': 'Commission Simple',
|
||||
'version': '16.0.1.0.0',
|
||||
'version': '18.0.1.0.0',
|
||||
'category': 'Sales',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Compute commissions for salesman',
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page name="commission" string="Commission" attrs="{'invisible': [('display_type', '!=', 'product')]}">
|
||||
<page name="commission" string="Commission" invisible="display_type != 'product'">
|
||||
<group name="commission_grp">
|
||||
<field name="commission_base"/>
|
||||
<label for="commission_rate"/>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" invisible="active"/>
|
||||
<group name="main">
|
||||
<field name="name"/>
|
||||
<field name="active" invisible="1"/>
|
||||
@@ -33,23 +33,23 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="commission_profile_tree" model="ir.ui.view">
|
||||
<field name="name">commission.profile.tree</field>
|
||||
<record id="commission_profile_list" model="ir.ui.view">
|
||||
<field name="name">commission.profile.list</field>
|
||||
<field name="model">commission.profile</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" decoration-bf="1"/>
|
||||
<field name="trigger_type" optional="show"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="commission_profile_action" model="ir.actions.act_window">
|
||||
<field name="name">Commission Profiles</field>
|
||||
<field name="res_model">commission.profile</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="commission_profile_menu" action="commission_profile_action" parent="commission_config_root" sequence="18"/>
|
||||
@@ -69,9 +69,9 @@
|
||||
<field name="applied_on" widget="radio"/>
|
||||
</group>
|
||||
<group name="match" string="Match">
|
||||
<field name="partner_ids" attrs="{'invisible': [('applied_on', 'not in', ('0_customer_product', '1_customer_product_category'))], 'required': [('applied_on', 'in', ('0_customer_product', '1_customer_product_category'))]}"/>
|
||||
<field name="product_categ_ids" attrs="{'invisible': [('applied_on', 'not in', ('1_customer_product_category', '3_product_category'))], 'required': [('applied_on', 'in', ('1_customer_product_category', '3_product_category'))]}"/>
|
||||
<field name="product_ids" attrs="{'invisible': [('applied_on', 'not in', ('0_customer_product', '2_product'))], 'required': [('applied_on', 'in', ('0_customer_product', '2_product'))]}"/>
|
||||
<field name="partner_ids" invisible="applied_on not in ('0_customer_product', '1_customer_product_category')" required="applied_on in ('0_customer_product', '1_customer_product_category')"/>
|
||||
<field name="product_categ_ids" invisible="applied_on not in ('1_customer_product_category', '3_product_category')" required="applied_on in ('1_customer_product_category', '3_product_category')"/>
|
||||
<field name="product_ids" invisible="applied_on not in ('0_customer_product', '2_product')" required="applied_on in ('0_customer_product', '2_product')"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
</group>
|
||||
@@ -86,17 +86,17 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="commission_rule_tree" model="ir.ui.view">
|
||||
<field name="name">commission.rule.tree</field>
|
||||
<record id="commission_rule_list" model="ir.ui.view">
|
||||
<field name="name">commission.rule.list</field>
|
||||
<field name="model">commission.rule</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="profile_id" invisible="not context.get('commission_rule_main_view')"/>
|
||||
<field name="applied_on"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="rate" string="Rate (%)"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
<record id="commission_rule_action" model="ir.actions.act_window">
|
||||
<field name="name">Commission Rules</field>
|
||||
<field name="res_model">commission.rule</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'commission_rule_main_view': True}</field>
|
||||
</record>
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</group>
|
||||
<group name="lines" string="Commission Lines">
|
||||
<field nolabel="1" name="line_ids" colspan="2">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="move_id"/>
|
||||
<field name="move_line_id"/>
|
||||
<field name="base"/>
|
||||
@@ -155,18 +155,18 @@
|
||||
<field name="amount" sum="1"/>
|
||||
<field name="rule_id"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="commission_result_tree" model="ir.ui.view">
|
||||
<field name="name">commission.result.tree</field>
|
||||
<record id="commission_result_list" model="ir.ui.view">
|
||||
<field name="name">commission.result.list</field>
|
||||
<field name="model">commission.result</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="date_range_id" optional="show"/>
|
||||
<field name="date_start" optional="hide"/>
|
||||
<field name="date_end" optional="hide"/>
|
||||
@@ -175,7 +175,7 @@
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="amount_total" sum="1" optional="show"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
<record id="commission_result_action" model="ir.actions.act_window">
|
||||
<field name="name">Commissions</field>
|
||||
<field name="res_model">commission.result</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="commission_result_menu" action="commission_result_action" parent="commission_root" sequence="10"/>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" invisible="active"/>
|
||||
<group name="main">
|
||||
<group name="main-left">
|
||||
<field name="name"/>
|
||||
@@ -32,12 +32,12 @@
|
||||
<notebook>
|
||||
<page name="assignments" string="Assignments">
|
||||
<field name="assign_ids">
|
||||
<tree editable="bottom">
|
||||
<list editable="bottom">
|
||||
<field name="assign_type"/>
|
||||
<field name="user_id" attrs="{'required': [('assign_type', '=', 'user')], 'readonly': [('assign_type', '!=', 'user')]}"/>
|
||||
<field name="user_id" required="assign_type == 'user'" readonly="assign_type != 'user'"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="rules" string="Rules">
|
||||
@@ -49,17 +49,17 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="commission_profile_tree" model="ir.ui.view">
|
||||
<field name="name">commission.profile.tree</field>
|
||||
<record id="commission_profile_list" model="ir.ui.view">
|
||||
<field name="name">commission.profile.list</field>
|
||||
<field name="model">commission.profile</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" decoration-bf="1"/>
|
||||
<field name="trigger_type" optional="show" widget="badge" decoration-info="trigger_type == 'invoice'" decoration-success="trigger_type == 'paid'" decoration-warning="trigger_type == 'in_payment'"/>
|
||||
<field name="date_range_type_id" optional="show"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<record id="commission_profile_action" model="ir.actions.act_window">
|
||||
<field name="name">Commission Profiles</field>
|
||||
<field name="res_model">commission.profile</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="commission_profile_menu" action="commission_profile_action" parent="commission_config_root" sequence="18"/>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button name="draft2done" type="object" states="draft" string="Confirm" class="btn-primary"/>
|
||||
<button name="backtodraft" type="object" states="done" string="Back to Draft" confirm="Are you sure you want to go back to draft?"/>
|
||||
<button name="draft2done" type="object" invisible="state != 'draft'" string="Confirm" class="btn-primary"/>
|
||||
<button name="backtodraft" type="object" invisible="state != 'done'" string="Back to Draft" confirm="Are you sure you want to go back to draft?"/>
|
||||
<button name="%(commission_simple.commission_result_xlsx_report)d" type="action" string="Excel Export"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
@@ -37,7 +37,7 @@
|
||||
</group>
|
||||
<group name="lines" string="Commission Lines">
|
||||
<field nolabel="1" name="line_ids" colspan="2" widget="many2many">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="move_id"/>
|
||||
<field name="date" optional="hide"/>
|
||||
<field name="partner_id"/>
|
||||
@@ -55,7 +55,7 @@
|
||||
<field name="commission_rule_id" optional="hide"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
<div class="oe_chatter">
|
||||
@@ -67,11 +67,11 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="commission_result_tree" model="ir.ui.view">
|
||||
<field name="name">commission.result.tree</field>
|
||||
<record id="commission_result_list" model="ir.ui.view">
|
||||
<field name="name">commission.result.list</field>
|
||||
<field name="model">commission.result</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree decoration-info="state == 'draft'">
|
||||
<list decoration-info="state == 'draft'">
|
||||
<header>
|
||||
<button
|
||||
name="draft2done"
|
||||
@@ -90,7 +90,7 @@
|
||||
<field name="base_total" sum="1" optional="hide"/>
|
||||
<field name="amount_total" sum="1" optional="show"/>
|
||||
<field name="state" decoration-info="state == 'draft'" decoration-success="state == 'done'" widget="badge"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<record id="commission_result_action" model="ir.actions.act_window">
|
||||
<field name="name">Commissions</field>
|
||||
<field name="res_model">commission.result</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="commission_result_menu" action="commission_result_action" parent="commission_root" sequence="10"/>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<field name="company_id" invisible="1"/>
|
||||
</group>
|
||||
<group name="match" string="Match">
|
||||
<field name="partner_ids" attrs="{'invisible': [('applied_on', 'not in', ('0_customer_product', '1_customer_product_category'))], 'required': [('applied_on', 'in', ('0_customer_product', '1_customer_product_category'))]}"/>
|
||||
<field name="product_categ_ids" attrs="{'invisible': [('applied_on', 'not in', ('1_customer_product_category', '3_product_category'))], 'required': [('applied_on', 'in', ('1_customer_product_category', '3_product_category'))]}"/>
|
||||
<field name="product_ids" attrs="{'invisible': [('applied_on', 'not in', ('0_customer_product', '2_product'))], 'required': [('applied_on', 'in', ('0_customer_product', '2_product'))]}"/>
|
||||
<field name="partner_ids" invisible="applied_on not in ('0_customer_product', '1_customer_product_category')" required="applied_on in ('0_customer_product', '1_customer_product_category')"/>
|
||||
<field name="product_categ_ids" invisible="applied_on not in ('1_customer_product_category', '3_product_category')" required="applied_on in ('1_customer_product_category', '3_product_category')"/>
|
||||
<field name="product_ids" invisible="applied_on not in ('0_customer_product', '2_product')" required="applied_on in ('0_customer_product', '2_product')"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
</group>
|
||||
@@ -37,11 +37,11 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="commission_rule_tree" model="ir.ui.view">
|
||||
<field name="name">commission.rule.tree</field>
|
||||
<record id="commission_rule_list" model="ir.ui.view">
|
||||
<field name="name">commission.rule.list</field>
|
||||
<field name="model">commission.rule</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="profile_id" invisible="not context.get('commission_rule_main_view')"/>
|
||||
<field name="applied_on" widget="badge" decoration-danger="applied_on == '0_customer_product'" decoration-warning="applied_on == '1_customer_product_category'" decoration-info="applied_on == '2_product'" decoration-success="applied_on == '3_product_category'"/>
|
||||
<field name="apply_description"/>
|
||||
@@ -49,7 +49,7 @@
|
||||
<field name="date_end" optional="show"/>
|
||||
<field name="rate" string="Rate (%)"/>
|
||||
<field name="base" widget="badge" decoration-success="base == 'invoiced'" decoration-warning="base == 'margin'"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<record id="commission_rule_action" model="ir.actions.act_window">
|
||||
<field name="name">Commission Rules</field>
|
||||
<field name="res_model">commission.rule</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'commission_rule_main_view': True}</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user