odoo18/addons_extensions/user_timelines/views/hr_employee_views.xml

35 lines
1.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_employee_form_user_timeline" model="ir.ui.view">
<field name="name">hr.employee.form.user.timeline</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_open_timeline"
type="object"
class="oe_stat_button"
icon="fa-calendar"
invisible="not id">
<span class="o_stat_text">Timeline</span>
</button>
</xpath>
<xpath expr="//field[@name='parent_id']" position="replace">
<field name="parent_id" widget="user_timeline"/>
</xpath>
<xpath expr="//field[@name='coach_id']" position="replace">
<field name="coach_id" widget="user_timeline"/>
</xpath>
<xpath expr="//group[@name='active_group']//field[@name='user_id']" position="replace">
<field name="user_id"
string="Related User"
help=""
domain="[('company_ids', 'in', company_id), ('share', '=', False)]"
context="{'default_create_employee_id': id}"
widget="user_timeline"/>
</xpath>
</field>
</record>
</odoo>