[FIX] hr_holidays: date_from, date_to required in form view only for leave requests, not for allocation requests

This commit is contained in:
Thibault Delavallée 2014-06-13 09:25:48 +02:00
parent f9fc9fdf1c
commit 2f43cf041d
1 changed files with 5 additions and 2 deletions

View File

@ -63,13 +63,16 @@
<sheet string="Leave Request">
<group>
<group>
<field name="type" invisible="1"/>
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="holiday_status_id" context="{'employee_id':employee_id}"/>
<label for="number_of_days_temp" string="Duration" help="The default duration interval between the start date and the end date is 8 hours. Feel free to adapt it to your needs."/>
<div>
<group col="3">
<field name="date_from" nolabel="1" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/><label string="-" class="oe_inline"/>
<field name="date_to" nolabel="1" on_change="onchange_date_to(date_to, date_from)" required="1" class="oe_inline"/>
<field name="date_from" nolabel="1" on_change="onchange_date_from(date_to, date_from)"
attrs="{'required': [('type', '=', 'remove')]}" class="oe_inline"/><label string="-" class="oe_inline"/>
<field name="date_to" nolabel="1" on_change="onchange_date_to(date_to, date_from)"
attrs="{'required': [('type', '=', 'remove')]}" class="oe_inline"/>
</group>
<div>
<field name="number_of_days_temp" class="oe_inline"/> days