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

     	<record id="share_step0_form" model="ir.ui.view">
            <field name="name">share.step0.form</field>
            <field name="model">share.create</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
			<form string="Share">
              <separator colspan="4" string="Step 1: Chose the action and the additional domain"/>    			  
			  <field name="action_id"/>
              <field name="domain"/>
			  <separator colspan="4"/>
			   <group col="2" colspan="4">
            		<button special="cancel"  string="Cancel" icon='gtk-cancel'/>
					<button name="do_step_1" string="Next" colspan="1" type="object" icon="gtk-go-forward"/>
				</group>
			</form>
            </field>
        </record>

        <record id="share_step1_form" model="ir.ui.view">
            <field name="name">share.step1.form</field>
            <field name="model">share.create</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
			<form string="Share">              
			  <separator colspan="4" string="Step 2: Chose the User type"/>              
			  <field name="user_type"/>
              <newline/>
              <group colspan="4" attrs="{'invisible':[('user_type','!=','existing')]}">
                  <separator colspan="4" string="Exising Users"/>
                  <field colspan="4" nolabel="1" name="user_ids"  domain="[('share_user','=',True)]"/>
              </group>
              <group colspan="4" attrs="{'invisible':[('user_type','!=','new')]}">
                <separator colspan="4" string="New Users"/>
                <field colspan="4" nolabel="1" name="new_user"/>
              </group>
			  <separator colspan="4"/>
			   <group col="3" colspan="4">
            		<button special="cancel"  string="Cancel" icon='gtk-cancel'/>                   
					<button name="do_step_2" string="Next" colspan="1" type="object" icon="gtk-go-forward"/>
				</group>
			</form>
            </field>
        </record>

        <record id="share_step2_form" model="ir.ui.view">
            <field name="name">share.step2.form</field>
            <field name="model">share.create</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
			<form string="Share">              
			  <separator colspan="4" string="Step 3: Chose Access Mode"/>
              <group colspan="4">              
    			  <field name="access_mode"/>              
              </group>              
			  <separator colspan="4"/>
			   <group col="3" colspan="4">
            		<button special="cancel"  string="Cancel" icon='gtk-cancel'/>
					<button name="do_step_3" string="Next" colspan="1" type="object" icon="gtk-go-forward"/>
				</group>
			</form>
            </field>
        </record>

         

       <record id="action_share_wizard" model="ir.actions.act_window">
            <field name="name">Share Access Rules</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">share.create</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="share_step0_form"/>	        
            <field name="target">new</field>
    	</record>

        <menuitem action="action_share_wizard" id="menu_action_share_wizard" parent="base.menu_security"/>
        

        <record id="share_result_form" model="ir.ui.view">
            <field name="name">share.result.form</field>
            <field name="model">share.result</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
			<form string="Share">
              <separator colspan="4" string="Step 4: Share Users Detail"/>    			  
			  <field name="users" colspan="4" nolabel="1"/>              
			  <separator colspan="4"/>
			   <group col="2" colspan="4">
            		<button special="cancel"  string="Cancel" icon='gtk-cancel'/>
					<button name="do_send_email" string="Send Email" type="object" icon="gtk-apply"/>
				</group>
			</form>
            </field>
        </record>
        

        

                 

	</data>
</openerp>
