[FIX]hr_hodlidays: date_from and date_to are required only if leave request, not...
authorDenis Ledoux <dle@openerp.com>
Tue, 11 Feb 2014 15:48:27 +0000 (16:48 +0100)
committerDenis Ledoux <dle@openerp.com>
Tue, 11 Feb 2014 15:48:27 +0000 (16:48 +0100)
bzr revid: dle@openerp.com-20140211154827-d1529gkf30e57wz5

addons/hr_holidays/hr_holidays_view.xml

index d87cc63..d4b84ba 100644 (file)
@@ -74,8 +74,8 @@
                                 <label for="number_of_days_temp" string="Duration"/>
                             <div>
                                 <group col="3" attrs="{'invisible': [('type', '=', 'add')]}">
-                                    <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