Files
odoo_source/addons/hr_homeworking/views/res_users.xml
T
Leonardo Pavan Rocha cbab7b013e [IMP] hr_homeworking: prevent deleting worklocations used by employees
This commit prevents deleting worklocations if they are used as default of an
employee. In case the worklocation is deleted, exceptions using that
worklocation are also deleted.

task-3527196

closes odoo/odoo#137502

Related: odoo/upgrade#5260
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-12 16:12:04 +00:00

24 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="res_useurs_view_form_profile" model="ir.ui.view">
<field name="name">res.users.preferences.form.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="hr.res_users_view_form_profile"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='managers']" position="after">
<group name="Homeworking" string="Remote Work">
<span class="text-muted fst-italic oe_inline" colspan="2">Specify your default work location for each day of the week. This schedule will repeat itself each week.</span>
<field name="monday_location_id" placeholder="Unspecified"/>
<field name="tuesday_location_id" placeholder="Unspecified"/>
<field name="wednesday_location_id" placeholder="Unspecified"/>
<field name="thursday_location_id" placeholder="Unspecified"/>
<field name="friday_location_id" placeholder="Unspecified"/>
<field name="saturday_location_id" placeholder="Unspecified"/>
<field name="sunday_location_id" placeholder="Unspecified"/>
</group>
</xpath>
</field>
</record>
</data>
</odoo>