<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_base_calendar_set_exrule" model="ir.ui.view">
            <field name="name">base.calendar.set.exrule.form</field>
            <field name="model">base.calendar.set.exrule</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
            <form string="Set Exrule">
                    <separator string="Select range to Exclude" colspan="8"/>
                    <group col="8" colspan="6">
                        <field name="interval" />
                        <field name="freq" />
                        <field name="count" />
                        <field name="end_date" />
                    </group>
                    <group col="8" colspan="8" name="Select weekdays"
                        attrs="{'invisible' : [('freq','!=','weekly')]}">
                        <field name="mo" colspan="1" />
                        <field name="tu" colspan="1" />
                        <field name="we" colspan="1" />
                        <field name="th" colspan="1" />
                        <field name="fr" colspan="1" />
                        <field name="sa" colspan="1" />
                        <field name="su" colspan="1" />
                        <newline />
                    </group>
                   <group col="8" colspan="6"
                        attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
                        <group col="2" colspan="1">
                            <field name="select1" />
                        </group>
                        <group col="2" colspan="1"
                            attrs="{'invisible' : [('select1','=','day')]}">
                            <field name="day"
                                attrs="{'required' : [('select1','=','date')]}"/>
                        </group>
                      <group col="3" colspan="1"
                            attrs="{'invisible' : [('select1','=','date')]}">
                            <field name="byday" string="The"
                                attrs="{'required' : [('select1','=','day')]}"/>
                            <field name="week_list" nolabel="1"
                                attrs="{'required' : [('select1','=','day')]}"/>
                        </group>
                       <group col="1" colspan="1"
                            attrs="{'invisible' : [('freq','!=','yearly')]}">
                            <field name="month_list" string="of"
                                colspan="1"
                                attrs="{'required' : [('freq','=','yearly')]}"/>
                        </group>
                    </group>
                    <group colspan="4" col="6">
                        <separator string="" colspan="8"/>
                        <label string="" colspan="2"/>
                        <button  icon="gtk-cancel" special="cancel" string="_Cancel"/>
                        <button  icon="gtk-ok" string="_Ok" name="compute_exrule_string" type="object"/>
                    </group>
                </form>
         </field>
	</record>

        <record id="action_base_calendar_set_exrule" model="ir.actions.act_window">
            <field name="name">Set Exclude range</field>
            <field name="res_model">base.calendar.set.exrule</field>
            <field name="view_type">form</field>
            <field name="view_mode">form,tree</field>
           <field name="target">new</field>
        </record>

    </data>
</openerp>
