commission_simple: display fields on account.move.line

This commit is contained in:
Alexis de Lattre
2024-12-10 13:02:46 +01:00
parent ba7406290b
commit d9b43df0f1
2 changed files with 35 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ This module has been written by Alexis de Lattre from Akretion
'views/commission_profile.xml',
'views/commission_rule.xml',
'views/commission_result.xml',
# 'views/res_users.xml',
'views/account_move_line.xml',
'views/res_config_settings.xml',
'wizards/commission_compute_view.xml',
],

View File

@@ -0,0 +1,34 @@
<?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="view_move_line_form" model="ir.ui.view">
<field name="model">account.move.line</field>
<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')]}">
<group name="commission_grp">
<field name="commission_base"/>
<label for="commission_rate"/>
<div name="commission_rate">
<field name="commission_rate" class="oe_inline"/> %
</div>
<field name="commission_amount"/>
<field name="commission_rule_id"/>
<field name="display_type" invisible="1"/>
<field name="company_currency_id" invisible="1"/>
</group>
</page>
</notebook>
</field>
</record>
</odoo>