<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>
        <record model="ir.ui.view" id="party_view_form">
            <field name="model">party.party</field>
            <field name="inherit" ref="party.party_view_form"/>
            <field name="name">party_form</field>
        </record>

        <record model="ir.action.act_window" id="act_opportunity_form2">
            <field name="name">Sales Leads/Opportunities</field>
            <field name="res_model">sale.opportunity</field>
            <field name="domain"
                eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('party', '=', Eval('active_id')), ('party', 'in', Eval('active_ids')))]"
                pyson="1"/>
            <field name="search_value" eval="[('state', 'not in', ['won', 'cancelled', 'lost'])]" pyson="1"/>
        </record>
        <record model="ir.action.keyword"
                id="act_open_sale_opportunity_keyword1">
            <field name="keyword">form_relate</field>
            <field name="model">party.party,-1</field>
            <field name="action" ref="act_opportunity_form2"/>
        </record>

    </data>
</tryton>
