[ADD] commission_simple, commission_simple_agent, sale_agent
3 modules backported from v16
This commit is contained in:
21
commission_simple_agent/views/commission_profile.xml
Normal file
21
commission_simple_agent/views/commission_profile.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2024 Akretion France (https://www.akretion.com)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="commission_profile_form" model="ir.ui.view">
|
||||
<field name="model">commission.profile</field>
|
||||
<field name="inherit_id" ref="commission_simple.commission_profile_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='assign_ids']/tree/field[@name='user_id']" position="after">
|
||||
<field name="agent_id" attrs="{'required': [('assign_type', '=', 'agent')], 'readonly': [('assign_type', '!=', 'agent')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
32
commission_simple_agent/views/commission_result.xml
Normal file
32
commission_simple_agent/views/commission_result.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2024 Akretion France (https://www.akretion.com)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="commission_result_tree" model="ir.ui.view">
|
||||
<field name="model">commission.result</field>
|
||||
<field name="inherit_id" ref="commission_simple.commission_result_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="assign_type" position="attributes">
|
||||
<attribute name="decoration-danger">assign_type == 'agent'</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="commission_result_search" model="ir.ui.view">
|
||||
<field name="model">commission.result</field>
|
||||
<field name="inherit_id" ref="commission_simple.commission_result_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="user" position="after">
|
||||
<filter name="agent" domain="[('assign_type', '=', 'agent')]" string="Agent"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user