[FIX] hr: tz on user required in view because of resource mixin

In the user preference, change the timezone of the user to blank (False value)
Save

Before this commit, a cryptic error was raised because the field tz in
resource.resource is required
Note that when writing on res.user, we write some fields (including tz)
on hr.employee, which is a resource.mixin, and therefore uses resource.resource

After this commit, we make the field required in the view

OPW 1934462

closes odoo/odoo#31312
This commit is contained in:
Lucas Perais (lpe)
2019-02-21 08:33:26 +00:00
parent faf8c41d80
commit 84143a34b3
+11
View File
@@ -624,6 +624,17 @@
</field>
</record>
<record id="view_users_form_simple_modif_resource" model="ir.ui.view">
<field name="name">res.users.preferences.form.resource</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="arch" type="xml">
<field name="tz" position="attributes">
<attribute name="required">1</attribute>
</field>
</field>
</record>
<menuitem
action="open_module_tree_department"
id="menu_hr_department_tree"