<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record model="ir.ui.view" id="link_partner_view">
            <field name="name">Link partner wizard view</field>
            <field name="model">banking.link_partner</field>
            <field name="arch" type="xml">
                <form string="Link partner" version="7.0" >
                    <group colspan="4" col="6" string="Transaction data">
                        <field name="ref" />
                        <field name="amount" />
                        <field name="remote_account" />
                        <field name="message" colspan="6"/>
                    </group>
                    <group colspan="4" col="4" string="Create or link partner">
                        <field name="name"
                               attrs="{'readonly': [('partner_id', '!=', False)]}" />
                        <field name="partner_id"/>
                    </group>
                    <group colspan="2">
                        <field name="is_company" attrs="{'invisible':
                            [('partner_id', '!=', False)]}"/>
                    </group>
                    <group colspan="4"
                           string="Address"
                           attrs="{'invisible': [('partner_id', '!=', False)]}"
                           col="4">
                        <group colspan="2" col="2">
                            <field name="street"/>
                            <field name="street2"/>
                            <field name="zip"/>
                            <field name="city"/>
                            <field name="country_id"/>
                            <field name="state_id"/>
                        </group>
                        <group colspan="2" col="2">
                            <field name="phone"/>
                            <field name="fax"/>
                            <field name="mobile"/>
                            <field name="email" widget="email"/>
                        </group>
                    </group>
                    <footer>
                        <button string="Create partner"
                                name="link_partner" type="object"
                                class="oe_highlight"
                                attrs="{'invisible': [('partner_id', '!=', False)]}"
                                />
                        <button string="Link existing partner"
                                class="oe_highlight"
                                name="link_partner" type="object"
                                attrs="{'invisible': [('partner_id', '==', False)]}"
                                />
                         or
                        <button class="oe_link" string="Cancel" special="cancel" />
                    </footer>
                </form>
            </field>
        </record>
    </data>
</openerp>
