2
0
account-financial-tools/account_loan/views/res_partner.xml
2023-09-28 16:47:31 +02:00

35 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 Dixmit
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record model="ir.ui.view" id="res_partner_form_view">
<field name="name">res.partner.form (in account_loan)</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button
type="object"
class="oe_stat_button"
icon="fa-money"
name="action_view_partner_lended_loans"
groups="account.group_account_user"
context="{'default_partner_id': active_id}"
attrs="{'invisible': [('lended_loan_count','=', 0)]}"
>
<div class="o_form_field o_stat_info">
<span class="o_stat_value">
<field name="lended_loan_count" />
</span>
<span class="o_stat_text">Loans</span>
</div>
</button>
</div>
</field>
</record>
</odoo>