<?xml version="1.0"?>
<openerp>
    <data>
        <record id="view_crm_opportunity_geo_assign_form" model="ir.ui.view">
            <field name="name">crm.lead.geo_assign.inherit</field>
            <field name="model">crm.lead</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//notebook[last()]" position="inside">
                        <page string="Assignation" groups="base.group_extended">
                        <group name="partner_assign_group" col="5" colspan="4">
                            <separator string="Partner Assignation" colspan="5"/>
                            <field name="partner_assigned_id" on_change="onchange_assign_id(partner_assigned_id)" domain="[('grade_id','&lt;&gt;',False)]"/>
                            <field name="date_assign"/>
                            <group colspan="1" col="1">
                                <button string="Forward"
                                    attrs="{'invisible':[('partner_assigned_id','=',False)]}"
                                    name="%(crm_lead_forward_to_partner_act)d"
                                    icon="terp-mail-forward" type="action"
                                    context="{'default_name': 'partner', 'default_partner_id': partner_assigned_id}"
                                />
                            </group>
                            <group name="geo_assign_group" col="5" colspan="4">
                                <separator string="Geo Assignation" colspan="5"/>
                                <field name="partner_latitude"/>
                                <field name="partner_longitude"/>
                                <group colspan="1" col="1">
                                    <button string="Geo Assign" name="assign_partner" type="object" colspan="1"
                                        icon="gtk-apply"/>
                                </group>
                            </group>
                        </group>
                        </page>
                    </xpath>
                </data>
            </field>
        </record>
    </data>
</openerp>
