[IMP]:hr_holidays:improved view

bzr revid: apa@tinyerp.com-20120625092643-q04fwfo16n3qrbu5
This commit is contained in:
Amit Patel (OpenERP) 2012-06-25 14:56:43 +05:30
parent 9175b5008e
commit afc972bd45
1 changed files with 42 additions and 39 deletions

View File

@ -67,19 +67,22 @@
<button string="Reset to New" name="set_to_draft" states="refuse,validate" type="object" groups="base.group_hr_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</header>
<sheet string="Leave Request" layout="auto">
<group col="4" colspan="4">
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
<label for="number_of_days_temp"/>
<div>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="number_of_days_temp" string="Duration"/>
</div>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')],'invisible':[('holiday_type','=','employee')]}"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
<sheet string="Leave Request">
<group>
<group>
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
</group>
<group>
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
<label for="number_of_days_temp"/>
<div>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/> -
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="number_of_days_temp" string="Duration"/> days
</div>
</group>
</group>
<notebook colspan="4">
<page string="General">
@ -92,9 +95,6 @@
</page>
</notebook>
</sheet>
<div class="oe_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@ -115,30 +115,33 @@
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</header>
<sheet>
<group colspan="4" col="4">
<field name="name"/>
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
<field name="number_of_days_temp"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')], 'invisible':[('holiday_type','=','employee')]}"/>
<field name="department_id" attrs="{'readonly':['|', ('holiday_type','=','category'), ('state','not in' ,('draft', 'confirm'))]}"/>
</group>
<notebook>
<page string="General">
<group col="4">
<field name="double_validation" invisible="1"/>
<field name="manager_id"/>
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
<group>
<group>
<field name="name"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
<field name="department_id" attrs="{'readonly':['|', ('holiday_type','=','category'), ('state','not in' ,('draft', 'confirm'))]}"/>
</group>
<field name="notes" placeholder="Add a reason..."/>
</page>
</notebook>
</sheet>
<div class="oe_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
<group>
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
<field name="number_of_days_temp"/>
</group>
</group>
<notebook>
<page string="General">
<group col="4">
<field name="double_validation" invisible="1"/>
<field name="manager_id"/>
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
</group>
<field name="notes" placeholder="Add a reason..."/>
</page>
</notebook>
</sheet>
<div class="oe_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>