summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/hr_holidays/hr_holidays_view.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 302ca4fe6ee..3f8490942f3 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -76,7 +76,7 @@
<notebook colspan="4">
<page string="General">
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
- <field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}"/>
+ <field name="department_id" attrs="{'readonly':['|', ('holiday_type','=','category'), ('state','not in' ,('draft', 'confirm'))]}"/>
<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"/>
@@ -121,7 +121,7 @@
<notebook colspan="4">
<page string="General">
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
- <field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}"/>
+ <field name="department_id" attrs="{'readonly':['|', ('holiday_type','=','category'), ('state','not in' ,('draft', 'confirm'))]}"/>
<field name="number_of_days_temp"/>
<field name="double_validation" invisible="1"/>
<newline/>