[IMP] hr: Make timezone required on saved record

`tz` field is technical field related to `resource_id`, which is required field on that model.

However it is possible to try to write a void value, which leads to an issue as it is technically required.
With this commit we make the tz field required at write.

closes odoo/odoo#77372

X-original-commit: 7cda3632b1f50ea757d25369e8a1261d8aeab16d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Swapnesh Shah
2021-09-29 08:33:22 +00:00
parent 2306ef1044
commit b948b197da
+2 -1
View File
@@ -121,7 +121,8 @@
</group>
<group string="Schedule">
<field name="resource_calendar_id" required="1"/>
<field name="tz"/>
<field name="id" invisible="1"/>
<field name="tz" attrs="{'required': [('id', '!=', False)]}"/>
</group>
</div>
</div>