<?xml version="1.0" ?>
<odoo>
    <record id="account_journal_view_form" model="ir.ui.view">
        <field name="model">account.journal</field>
        <field name="inherit_id" ref="account.view_account_journal_form" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='company_id']" position="after">
                <field name="pms_property_ids" widget="many2many_tags" />
                <field
                    name="allowed_pms_payments"
                    attrs="{'invisible':[('type','not in',('bank', 'cash'))]}"
                />
                <field
                    name="avoid_autoinvoice_downpayment"
                    attrs="{'invisible':[('type','not in',('bank', 'cash'))]}"
                />
            </xpath>
        </field>
    </record>

    <record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
        <field name="model">account.journal</field>
        <field name="inherit_id" ref="account.account_journal_dashboard_kanban_view" />
        <field name="arch" type="xml">
            <xpath expr="//a[@name='open_action']" position="after">
                <span class="small"> <field name="pms_property_ids" /></span>
            </xpath>
        </field>
    </record>

    <record id="view_account_journal_search" model="ir.ui.view">
        <field name="model">account.journal</field>
        <field name="inherit_id" ref="account.view_account_journal_search" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='name']" position="after">
                <field
                    name="pms_property_ids"
                    string="Property"
                    filter_domain="[
                        '|',
                        ('pms_property_ids', 'ilike', self),
                        ('pms_property_ids', '=', False),
                    ]"
                />
            </xpath>
        </field>
    </record>
</odoo>
