<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="view_partner_credit_tree" model="ir.ui.view">
            <field name="name">partner.credit.tree</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_tree"/>
            <field name="arch" type="xml">
                <field name="function" position="after">
                    <field name="nfu_credit"/>
                </field>
            </field>
    </record>

    <record id="view_partner_credit_kanban" model="ir.ui.view">
        <field name="name">partner.credit.kanban.nfu_credit</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.res_partner_kanban_view"/>
        <field name="arch" type="xml">
            <xpath expr="//kanban/field[@name='email']" position="after">
                <field name="nfu_credit"/>
                <field name="currency_id"/>
            </xpath>
            <xpath expr="//div[hasclass('oe_kanban_details')]//ul" position="inside">
                <li>
                    <span>Credit:</span> <field
                        name="nfu_credit"
                        widget="monetary"
                        options="{'currency_field': 'currency_id'}"
                    />
                </li>
            </xpath>
        </field>
    </record>
</odoo>
