<?xml version="1.0" encoding="utf-8"?>
<openerp>
	<data>
		<!--    Attendee invite wizard-->

		<record id="view_calendar_invite_attendee_wizard"
			model="ir.ui.view">
			<field name="name">Invite Attendees</field>
			<field name="model">base_calendar.invite.attendee</field>
			<field name="type">form</field>
			<field name="arch" type="xml">
				<form string="Invite People">
                    <separator string="Invite People" colspan="4" />
					<field name="type" />
					<field name="send_mail" />
					<newline />
					<group col="2" colspan="6"
						attrs="{'invisible': [('type', '!=', 'external')]}">
						<field name="email" colspan="4"
							attrs="{'required': [('type', '=', 'external')]}" />
					</group>
					<group col="2" colspan="6"
						attrs="{'invisible': [('type', '!=', 'internal')]}">
						<separator string="Users" colspan="4" />
						<field name="user_ids" select="1" colspan="4"
							nolabel="1" />
						<newline />
					</group>
					<group col="2" colspan="6"
						attrs="{'invisible': [('type', '!=', 'partner')]}">
						<field name="partner_id" colspan="2"
							on_change="onchange_partner_id(partner_id)"
							attrs="{'required': [('type', '=', 'partner')]}" />
						<newline />
						<separator string="Partner Contacts"
							colspan="6" />
						<field name="contact_ids" select="1" colspan="4"
							nolabel="1" domain="[('partner_id', '=', partner_id)]"
							attrs="{'readonly': [('type', '!=', 'partner')]}" />
					</group>
					<newline />
					<separator string="" colspan="6" />
					<group col="4" colspan="4">
					<button icon='gtk-cancel' special="cancel"
						string="Cancel" />
					<button name="do_invite" string="Invite"
						type="object" icon="gtk-ok" />
					</group>
				</form>
			</field>
		</record>


		<!--    Attendee invite action-->

		<record id="action_view_calendar_invite_attendee_wizard" model="ir.actions.act_window">
			<field name="name">Invite Attendees</field>
			<field name="type">ir.actions.act_window</field>
			<field name="res_model">base_calendar.invite.attendee</field>
			<field name="view_type">form</field>
			<field name="view_mode">form</field>
			<field name="target">new</field>
		</record>

	</data>
</openerp>
