<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="hr_housekeeping_employee_form" model="ir.ui.view">
        <field name="model">hr.employee</field>
        <field name="inherit_id" ref="hr.view_employee_form" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='work_location']" position="after">
                <field
                    name="pre_assigned_room_ids"
                    widget="many2many_tags"
                    attrs="{'invisible': [('job_name', '!=', 'Housekeeper')]}"
                    domain="[('id', 'in', allowed_pre_assigned_room_ids)]"
                />
                <field name="job_name" invisible="1" />
                <field name="allowed_pre_assigned_room_ids" invisible="1" />
            </xpath>
        </field>
    </record>

</odoo>
