<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record id="share_step1_form_portal" model="ir.ui.view">
            <field name="name">share.step1.form.portal</field>
            <field name="model">share.wizard</field>
            <field name="inherit_id" ref="share.share_step1_form"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='user_type']" position="attributes">
                    <attribute name='invisible'>0</attribute>
                    <attribute name='colspan'>4</attribute>
                </xpath>
                <xpath expr="//group[@name='emails_group']" position="after">
                    <group name="user_group" colspan="4" attrs="{'invisible':[('user_type','!=','existing')]}">
                        <field colspan="4" nolabel="1" name="user_ids" mode="tree">
                            <tree string="Existing users">
                                <field name="login"/>
                            </tree>
                        </field>
                    </group>
                    <group colspan="4" attrs="{'invisible':[('user_type','!=','groups')]}">
                        <field colspan="4" nolabel="1" name="group_ids" mode="tree">
                            <tree string="Existing groups">
                                <field name="name"/>
                            </tree>
                        </field>
                    </group>
                </xpath>
            </field>
        </record>

        <record id="share_step2_form_portal" model="ir.ui.view">
            <field name="name">share.step2.form.portal</field>
            <field name="model">share.wizard</field>
            <field name="inherit_id" ref="share.share_step2_form"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='result_line_ids']//field[@name='login']" position="after">
                    <field name="share_url" groups="base.group_no_one"/>
                </xpath>
                <xpath expr="//field[@name='result_line_ids']" position="after">
                    <newline/>
                    <group string="Details" groups="base.group_no_one">
                        <field name="share_root_url"/>
                    </group>
                </xpath>
            </field>
        </record>

    </data>
</openerp>
