[FIX] hr_holidays: Allow a employee to reset to draft his own leaves

If a leave request is refused by the manager, the button reset to draft is displayed, but the employee cannot use it because he doesn't have the write access rights on his own leave requests

In 'refuse' state, all the form is readonly, but the employee should be have to reset his own leave to draft to modify it and re-submit it.
This commit is contained in:
Yannick Tivisse
2016-09-20 12:01:53 +02:00
parent 2c4bc2ffce
commit bf1bfb06fe
@@ -30,7 +30,7 @@
<record id="property_rule_holidays_employee_write" model="ir.rule">
<field name="name">Employee Holidays Create, Write, Unlink</field>
<field name="model_id" ref="model_hr_holidays"/>
<field name="domain_force">[('employee_id.user_id','=',user.id), ('state', 'in', ['draft', 'confirm', 'cancel'])]</field>
<field name="domain_force">[('employee_id.user_id','=',user.id), ('state', 'in', ['draft', 'confirm', 'cancel', 'refuse'])]</field>
<field name="perm_read" eval="False"/>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>