[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',
|
||||
@@ -44,5 +44,5 @@ This module has been written by Alexis de Lattre from Akretion
|
||||
'views/res_config_settings.xml',
|
||||
'wizards/commission_compute_view.xml',
|
||||
],
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -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"/>
|
||||
@@ -31,12 +31,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">
|
||||
@@ -48,23 +48,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"/>
|
||||
|
||||
@@ -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?"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<group name="main">
|
||||
@@ -35,7 +35,7 @@
|
||||
</group>
|
||||
<group name="lines" string="Commission Lines">
|
||||
<field nolabel="1" name="line_ids" colspan="2">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="move_id"/>
|
||||
<field name="date" optional="hide"/>
|
||||
<field name="partner_id"/>
|
||||
@@ -49,7 +49,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">
|
||||
@@ -61,11 +61,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>
|
||||
<list>
|
||||
<field name="date_range_id" optional="show"/>
|
||||
<field name="date_start" optional="hide"/>
|
||||
<field name="date_end" optional="hide"/>
|
||||
@@ -76,7 +76,7 @@
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<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>
|
||||
|
||||
@@ -104,7 +104,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,18 +37,18 @@
|
||||
</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 (%)"/>
|
||||
<field name="base"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -69,7 +69,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>
|
||||
|
||||
|
||||
@@ -13,22 +13,12 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='storno']" position="after">
|
||||
<h2>Commissions</h2>
|
||||
<div class="row mt16 o_settings_container" id="commission_simple">
|
||||
<div class="col-12 col-lg-12 o_setting_box" id="commission_simple-settings">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="row" id="commission_date_range_type_id">
|
||||
<label
|
||||
for="commission_date_range_type_id"
|
||||
class="col-md-5"
|
||||
/>
|
||||
<field name="commission_date_range_type_id" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<xpath expr="//block[@id='storno']" position="after">
|
||||
<block title="Commissions" id="commission_simple">
|
||||
<setting id="commission_date_range_type" title="Date range type">
|
||||
<field name="commission_date_range_type_id"/>
|
||||
</setting>
|
||||
</block>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user