From 732f27c4398ae661ecfc1afb80e656e7c86d8d55 Mon Sep 17 00:00:00 2001
From: "Sina Chaichi Maleki (cmsi)" <cmsi@odoo.com>
Date: Tue, 22 Aug 2023 22:27:08 +0200
Subject: [PATCH] [FIX] hr_holidays: Ensure the name is mandatory in public
 holidays

The name field was previously optional when adding a new instance
from the tree view, which in the absence of a name, 'false' is indicated
in the calendar view. The field is now set as mandatory.

closes odoo/odoo#132772

Task: #3469914
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
---
 addons/hr_holidays/views/resource_views.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/addons/hr_holidays/views/resource_views.xml b/addons/hr_holidays/views/resource_views.xml
index 6b251c1028c6..d6975353c52a 100644
--- a/addons/hr_holidays/views/resource_views.xml
+++ b/addons/hr_holidays/views/resource_views.xml
@@ -34,6 +34,7 @@
             </xpath>
             <xpath expr="//field[@name='name']" position="attributes">
                 <attribute name="string">Name</attribute>
+                <attribute name="required">1</attribute>
             </xpath>
             <xpath expr="//field[@name='resource_id']" position="attributes">
                 <attribute name="invisible">1</attribute>
-- 
GitLab