[FIX] hr: prevent launch plan for archived employee

Issue:
------
The "Launch Plan" button appears for an archived employee.
It causes a traceback.

Solution:
---------
Do not display the button for an archived employee.

opw-3366815

closes odoo/odoo#125988

X-original-commit: ecc32425ff71d5e65597ca1424a9b356f97fa0f8
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
This commit is contained in:
Thomas Lefebvre (thle)
2023-06-22 09:50:34 +02:00
parent 876a82b299
commit fc08616eb4
+1 -1
View File
@@ -55,7 +55,7 @@
<field name="last_activity_time" invisible="1"/>
<field name="last_activity" invisible="1"/>
<header>
<button name="%(plan_wizard_action)d" string="Launch Plan" type="action" groups="hr.group_hr_user"/>
<button name="%(plan_wizard_action)d" string="Launch Plan" type="action" groups="hr.group_hr_user" attrs="{'invisible': [('active', '=', False)]}"/>
</header>
<sheet>
<div name="button_box" class="oe_button_box">