[FIX] hr_holidays: hide confirm button during create

This ensures that the user will not click on the confirm button before the record is saved which will prevent unnecessary UserError if the Timeof type requires no validation

closes odoo/odoo#160839

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
This commit is contained in:
Ahmed Mohamed
2024-04-09 16:43:46 +00:00
parent ec0ba10cea
commit 565a5b1d4a
+1 -1
View File
@@ -245,7 +245,7 @@
<field name="can_cancel" invisible="1"/>
<field name="has_mandatory_day" invisible="1"/>
<header>
<button string="Confirm" name="action_confirm" type="object" class="oe_highlight" invisible="state != 'draft' or not active"/>
<button string="Confirm" name="action_confirm" type="object" class="oe_highlight" invisible="id == False or state != 'draft' or not active"/>
<button string="Approve" name="action_approve" type="object" class="oe_highlight" invisible="not active or not can_approve or state != 'confirm'"/>
<button string="Validate" name="action_validate" invisible="state != 'validate1'" type="object" groups="hr_holidays.group_hr_holidays_user" class="oe_highlight"/>
<button string="Refuse" name="action_refuse" type="object" invisible="not active or not can_approve or state not in ('confirm', 'validate1', 'validate')"/>