Initial commit: Hr packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:50 +02:00
commit 62531cd146
2820 changed files with 1432848 additions and 0 deletions

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="hr_contract_type_view_tree" model="ir.ui.view">
<field name="model">hr.contract.type</field>
<field name="arch" type="xml">
<tree string="Contract Types" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
</tree>
</field>
</record>
<record id="hr_contract_type_view_form" model="ir.ui.view">
<field name="model">hr.contract.type</field>
<field name="arch" type="xml">
<form>
<group>
<group>
<field name="name" />
</group>
</group>
</form>
</field>
</record>
<record id="hr_contract_type_action" model="ir.actions.act_window">
<field name="name">Employment Types</field>
<field name="res_model">hr.contract.type</field>
<field name="view_mode">tree</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new employment type
</p>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_department_form" model="ir.ui.view">
<field name="name">hr.department.form</field>
<field name="model">hr.department</field>
<field name="arch" type="xml">
<form string="department">
<field name="company_id" invisible="1"/>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" type="action" name="%(hr.act_employee_from_department)d" icon="fa-users">
<field string="Employees" name="total_employee" widget="statinfo"/>
</button>
<button class="oe_stat_button" type="object" name="action_plan_from_department" icon="fa-list-ul">
<field string="Plans" name="plans_count" widget="statinfo"/>
</button>
</div>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="active" invisible="1"/>
<group col="4">
<field name="name"/>
<field name="manager_id"/>
<field name="parent_id"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" groups="base.group_user"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="view_department_tree" model="ir.ui.view">
<field name="name">hr.department.tree</field>
<field name="model">hr.department</field>
<field name="arch" type="xml">
<tree string="Companies" sample="1">
<field name="display_name"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_id" invisible="1"/>
<field name="manager_id"/>
<field name="total_employee" string="Employees"/>
<field name="parent_id"/>
</tree>
</field>
</record>
<record id="view_department_filter" model="ir.ui.view">
<field name="name">hr.department.search</field>
<field name="model">hr.department</field>
<field name="arch" type="xml">
<search string="Departments">
<field name="name" string="Department"/>
<field name="manager_id" />
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
</search>
</field>
</record>
<record id="hr_department_view_kanban" model="ir.ui.view" >
<field name="name">hr.department.kanban</field>
<field name="model">hr.department</field>
<field name="arch" type="xml">
<kanban class="oe_background_grey o_kanban_dashboard o_hr_department_kanban o_kanban_small_column" sample="1">
<field name="name"/>
<field name="company_id"/>
<field name="manager_id"/>
<field name="color"/>
<field name="total_employee"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}">
<div t-attf-class="o_kanban_card_header">
<div class="o_kanban_card_header_title">
<div class="o_primary"><a type="edit"><field name="name"/></a></div>
<div class="o_secondary" groups="base.group_multi_company">
<small>
<i class="fa fa-building-o" role="img" aria-label="Company" title="Company"/> <field name="company_id"/>
</small>
</div>
</div>
<div class="o_kanban_manage_button_section" t-if="!selection_mode">
<a class="o_kanban_manage_toggle_button" href="#"><i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/></a>
</div>
</div>
<div class="container o_kanban_card_content" t-if="!selection_mode">
<div class="row o_kanban_card_upper_content">
<div class="col-6 o_kanban_primary_left">
<button class="btn btn-primary" name="%(act_employee_from_department)d" type="action">
<t t-out="record.total_employee.raw_value"/> Employees
</button>
</div>
<div class="col-6 o_kanban_primary_right">
</div>
</div>
<div class="o_kanban_card_lower_content"
style="justify-content: end">
<!-- placeholder for bottom content -->
</div>
</div>
<div class="o_kanban_card_manage_pane dropdown-menu" role="menu">
<div class="o_kanban_card_manage_section">
<div role="menuitem" class="o_kanban_manage_reports">
<div class="o_kanban_card_manage_title ps-4 pb-1">
<span class="fw-bolder">Reporting</span>
</div>
</div>
</div>
<a t-if="widget.editable" role="menuitem" class="dropdown-item" type="edit">Configuration</a>
<ul t-if="widget.editable" class="oe_kanban_colorpicker" data-field="color" role="menu"/>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="hr_department_kanban_action" model="ir.actions.act_window">
<field name="name">Departments</field>
<field name="res_model">hr.department</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="view_department_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new department
</p><p>
Odoo's department structure is used to manage all documents
related to employees by departments: expenses, timesheets,
time off, recruitments, etc.
</p>
</field>
</record>
<record id="hr_department_tree_action" model="ir.actions.act_window">
<field name="name">Departments</field>
<field name="res_model">hr.department</field>
<field name="view_mode">tree,form,kanban</field>
<field name="search_view_id" ref="view_department_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new department
</p><p>
Odoo's department structure is used to manage all documents
related to employees by departments: expenses, timesheets,
leaves, recruitments, etc.
</p>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="hr_departure_reason_view_list" model="ir.ui.view">
<field name="model">hr.departure.reason</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="sequence" widget="handle" />
<field name="name" />
</tree>
</field>
</record>
<record id="hr_departure_reason_view_form" model="ir.ui.view">
<field name="model">hr.departure.reason</field>
<field name="arch" type="xml">
<form>
<group>
<group>
<field name="sequence" />
<field name="name" />
</group>
</group>
</form>
</field>
</record>
<record id="hr_departure_reason_action" model="ir.actions.act_window">
<field name="name">Departure Reasons</field>
<field name="res_model">hr.departure.reason</field>
<field name="view_mode">tree</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_employee_category_form" model="ir.ui.view">
<field name="name">hr.employee.category.form</field>
<field name="model">hr.employee.category</field>
<field name="arch" type="xml">
<form string="Employee Tags">
<sheet>
<group>
<field name="name"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_employee_category_list" model="ir.ui.view">
<field name="name">hr.employee.category.list</field>
<field name="model">hr.employee.category</field>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<tree string="Employees Tags" editable="bottom">
<field name="name"/>
</tree>
</field>
</record>
<record id="open_view_categ_form" model="ir.actions.act_window">
<field name="name">Employee Tags</field>
<field name="res_model">hr.employee.category</field>
<field name="view_mode">tree,form</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,221 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="hr_employee_public_view_search" model="ir.ui.view">
<field name="name">hr.employee.search</field>
<field name="model">hr.employee.public</field>
<field name="arch" type="xml">
<search string="Employees">
<field name="name" string="Employees" filter_domain="['|',('work_email','ilike',self),('name','ilike',self)]"/>
<field name="job_title" string="Job Title"/>
<field name="department_id" string="Department"/>
<field name="parent_id" string="Manager"/>
<field name="company_id" string="Company"/>
<separator/>
<filter name="my_team" string="My Team" domain="[('parent_id.user_id', '=', uid)]"/>
<filter name="my_department" string="My Department" domain="[('member_of_department', '=', True)]"/>
<separator/>
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
<group expand="0" string="Group By">
<filter name="group_manager" string="Manager" domain="[]" context="{'group_by':'parent_id'}"/>
<filter name="group_department" string="Department" domain="[]" context="{'group_by':'department_id'}"/>
<filter name="group_company" string="Company" domain="[]" context="{'group_by':'company_id'}"/>
</group>
<searchpanel>
<field name="company_id" groups="base.group_multi_company" icon="fa-building" enable_counters="1"/>
<field name="department_id" icon="fa-users" enable_counters="1"/>
</searchpanel>
</search>
</field>
</record>
<record id="hr_employee_public_view_form" model="ir.ui.view">
<field name="name">hr.employee.public.form</field>
<field name="model">hr.employee.public</field>
<field name="arch" type="xml">
<form string="Employee" create="0" write="0" js_class="hr_employee_form" class="o_employee_form">
<field name="image_128" invisible="1" />
<header/>
<sheet>
<field name="user_id" invisible="1"/>
<field name="user_partner_id" invisible="1"/>
<field name="active" invisible="1"/>
<div class="oe_button_box" name="button_box">
<!-- Used by other modules-->
</div>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="avatar_1920" widget='image' class="oe_avatar" options='{"zoom": true, "preview_image":"avatar_128"}'/>
<div class="oe_title">
<label for="name" string="Employee Name"/>
<h1 class="d-flex flex-row">
<span class="me-2">
<widget name="hr_employee_chat" invisible="not context.get('chat_icon')"/>
</span>
<field name="name" placeholder="e.g. John Doe" required="True"
style="font-size: min(4vw, 2.6rem);"/>
</h1>
<h2>
<field name="job_title" placeholder="Job Title" />
</h2>
</div>
<group>
<group>
<field name="mobile_phone" widget="phone"/>
<field name="work_phone" widget="phone"/>
<field name="work_email" widget="email"/>
</group>
<group>
<field name="department_id" context="{'open_employees_kanban': 1}"/>
<field name="job_id"/>
<field name="employee_type"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="parent_id"/>
<field name="coach_id"/>
</group>
</group>
<notebook>
<page name="public" string="Work Information">
<div id="o_work_employee_container" class="d-lg-flex"> <!-- These two div are used to position org_chart -->
<div id="o_work_employee_main" class="flex-grow-1">
<group string="Location" name="location">
<field name="address_id"
context="{'show_address': 1}"
options='{"always_reload": True, "highlight_first_line": True}'/>
<field name="work_location_id"/>
</group>
<group name="managers" string="Approvers" invisible="1">
<!-- overridden in other modules -->
</group>
<group string="Schedule" groups="base.group_no_one">
<field name="resource_calendar_id"/>
</group>
</div>
</div>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="hr_employee_public_view_tree" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee.public</field>
<field name="arch" type="xml">
<tree string="Employees" sample="1">
<field name="name"/>
<field name="work_phone" class="o_force_ltr"/>
<field name="work_email"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="department_id"/>
<field name="job_title"/>
<field name="parent_id"/>
<field name="coach_id" invisible="1"/>
</tree>
</field>
</record>
<record id="hr_employee_public_view_kanban" model="ir.ui.view">
<field name="name">hr.employee.kanban</field>
<field name="model">hr.employee.public</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<kanban class="o_hr_employee_kanban" js_class="hr_employee_kanban" sample="1">
<field name="id"/>
<field name="hr_presence_state"/>
<field name="user_id"/>
<field name="user_partner_id"/>
<field name="last_activity"/>
<field name="hr_icon_display"/>
<field name="show_hr_icon_display"/>
<field name="image_128" />
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record">
<field name="image_1024" class="o_kanban_image_fill_left d-block" preview_image="image_128"
widget="background_image" options="{'zoom': true, 'zoom_delay': 1000}"/>
<div class="oe_kanban_details">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<t t-if="record.show_hr_icon_display.raw_value">
<div class="float-end"
t-if="record.hr_icon_display.raw_value == 'presence_present'">
<!-- Employee is present/connected and it is normal according to his work schedule -->
<span class="fa fa-circle text-success" role="img" aria-label="Present"
title="Present" name="presence_present">
</span>
</div>
<div class="float-end"
t-if="record.hr_icon_display.raw_value == 'presence_absent'">
<!-- Employee is absent and it is normal according to his work schedule -->
<span class="fa fa-circle-o text-muted" role="img" aria-label="Absent"
title="Absent" name="presence_absent">
</span>
</div>
<div class="float-end"
t-if="record.hr_icon_display.raw_value == 'presence_absent_active'">
<!-- Employee is connected but according to his work schedule, he should not work for now -->
<span class="fa fa-circle-o text-success" role="img"
aria-label="Present but not active"
title="Present but not active" name="presence_absent_active">
</span>
</div>
<!-- Employee is not here but according to his work schedule, he should be connected -->
<div class="float-end"
t-if="record.hr_icon_display.raw_value == 'presence_to_define'">
<span class="fa fa-circle text-warning" role="img"
aria-label="To define" title="To define"
name="presence_to_define">
</span>
</div>
</t>
<field name="name"/>
</strong>
<span t-if="record.job_title.raw_value" class="o_kanban_record_subtitle"><field name="job_title"/></span>
</div>
</div>
<ul>
<li id="last_login"/>
<li t-if="record.work_email.raw_value"><field name="work_email" /></li>
<li t-if="record.work_phone.raw_value" class="o_force_ltr"><field name="work_phone" /></li>
</ul>
<div class="oe_kanban_content position-absolute start-0 bottom-0 end-0 me-2">
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left"/>
<div class="oe_kanban_bottom_right">
<widget name="hr_employee_chat"/>
</div>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="hr_employee_public_action" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee.public</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[]</field>
<field name="context">{'chat_icon': True}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="hr_employee_public_view_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new employee
</p><p>
With just a quick glance on the Odoo employee screen, you
can easily find all the information you need for each person;
contact data, job position, availability, etc.
</p>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,469 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_employee_filter" model="ir.ui.view">
<field name="name">hr.employee.search</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<search string="Employees">
<field name="name" string="Employee" filter_domain="['|', ('work_email', 'ilike', self), ('name', 'ilike', self)]"/>
<field name="category_ids" groups="hr.group_hr_user"/>
<field name="job_id"/>
<field name="parent_id" string="Manager"/>
<separator/>
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]"/>
<separator/>
<filter invisible="1" string="Late Activities" name="activities_overdue"
domain="[('my_activity_date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"/>
<filter invisible="1" string="Today Activities" name="activities_today"
domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
<filter invisible="1" string="Future Activities" name="activities_upcoming_all"
domain="[('my_activity_date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))]"/>
<separator/>
<filter name="my_team" string="My Team" domain="[('parent_id.user_id', '=', uid)]"/>
<filter name="my_department" string="My Department" domain="[('member_of_department', '=', True)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<group expand="0" string="Group By">
<filter name="group_manager" string="Manager" domain="[]" context="{'group_by': 'parent_id'}"/>
<filter name="group_department" string="Department" domain="[]" context="{'group_by': 'department_id'}"/>
<filter name="group_job" string="Job" domain="[]" context="{'group_by': 'job_id'}"/>
<filter name="group_category_ids" string="Tags" domain="[]" context="{'group_by': 'category_ids'}"/>
</group>
<searchpanel>
<field name="company_id" groups="base.group_multi_company" icon="fa-building" enable_counters="1"/>
<field name="department_id" icon="fa-users" enable_counters="1"/>
</searchpanel>
</search>
</field>
</record>
<record id="view_employee_form" model="ir.ui.view">
<field name="name">hr.employee.form</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<form string="Employee" js_class="hr_employee_form" class='o_employee_form'>
<field name="active" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="user_partner_id" invisible="1"/>
<field name="hr_presence_state" invisible="1"/>
<field name="hr_icon_display" invisible="1"/>
<field name="image_128" invisible="1" />
<field name="company_id" invisible="1"/>
<field name="last_activity_time" invisible="1"/>
<field name="last_activity" invisible="1"/>
<header>
<button name="%(plan_wizard_action)d" string="Launch Plan" type="action" groups="hr.group_hr_user" attrs="{'invisible': [('active', '=', False)]}"/>
</header>
<sheet>
<div name="button_box" class="oe_button_box">
</div>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="avatar_128" invisible="1"/>
<div class="o_employee_avatar">
<field name="image_1920" widget='image' class="oe_avatar m-0" options='{"zoom": true, "preview_image":"avatar_128"}'/>
<div id="hr_presence_status" class="d-flex align-items-end fs-6 o_employee_availability">
<!-- Employee is present/connected and it is normal according to his work schedule -->
<small role="img" class="fa fa-fw fa-circle text-success o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_present')]}" aria-label="Present" title="Present"/>
<!-- Employee is not present and it is normal according to his work schedule -->
<small role="img" class="fa fa-fw fa-circle-o text-muted o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_absent')]}" aria-label="Absent" title="Absent" name="presence_absent"/>
<!-- Employee is connected but according to his work schedule, he should not work for now -->
<small role="img" class="fa fa-fw fa-circle-o text-success o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_absent_active')]}" aria-label="Present but not active" title="Present but not active" name="presence_absent_active"/>
<!-- Employee is not here but according to his work schedule, he should be connected -->
<small role="img" class="fa fa-fw fa-circle text-warning o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_to_define')]}" aria-label="To define" title="To define" name="presence_to_define"/>
</div>
</div>
<div class="oe_title">
<h1 class="d-flex flex-row">
<span class="me-2">
<widget name="hr_employee_chat" invisible="not context.get('chat_icon')"/>
</span>
<field name="name" placeholder="Employee's Name"
required="True" style="font-size: min(4vw, 2.6rem);"/>
</h1>
<h2>
<field name="job_title" placeholder="Job Position" />
</h2>
<field name="category_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" placeholder="Tags" groups="hr.group_hr_user"/>
</div>
<group>
<group>
<field name="mobile_phone" widget="phone"/>
<field name="work_phone" widget="phone"/>
<field name="work_email" widget="email"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_country_id" invisible="1"/>
<field name="company_country_code" invisible="1"/>
</group>
<group>
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id"/>
<field name="coach_id"/>
</group>
</group>
<notebook>
<page name="public" string="Work Information">
<div id="o_work_employee_container" class="d-lg-flex"> <!-- These two div are used to position org_chart -->
<div id="o_work_employee_main" class="flex-grow-1">
<group string="Location">
<field name="address_id"
context="{'show_address': 1}"
options='{"always_reload": True, "highlight_first_line": True}'/>
<field name="work_location_id" context="{'default_address_id': address_id}" />
</group>
<group name="managers" string="Approvers" class="hide-group-if-empty" invisible="1">
<!-- is overridden in other hr related modules -->
</group>
<group name="departure" string="Departure" attrs="{'invisible': [('active', '=', True)]}">
<field name="departure_reason_id" options="{'no_edit': True, 'no_create': True, 'no_open': True}"/>
<field name="departure_description"/>
<field name="departure_date"/>
</group>
<group string="Schedule">
<field name="resource_calendar_id" required="1"/>
<field name="id" invisible="1"/>
<field name="tz" attrs="{'required': [('id', '!=', False)]}"/>
</group>
</div>
</div>
</page>
<page name="personal_information" string="Private Information" groups="hr.group_hr_user">
<group>
<group string="Private Contact">
<field name="address_home_id"
context="{
'show_address': 1,
'default_type': 'private',
'form_view_ref': 'base.res_partner_view_form_private'}"
options='{"always_reload": True, "highlight_first_line": True}'/>
<field name="private_email" string="Email"/>
<field name="phone" string="Phone" readonly="True"/>
<field name="bank_account_id" context="{'default_partner_id': address_home_id}"/>
<field name="lang" string="Language"/>
<label for="km_home_work"/>
<div class="o_row" name="div_km_home_work">
<field name="km_home_work" class="o_hr_narrow_field"/>
<span>Km</span>
</div>
</group>
<group string="Family Status">
<field name="marital"/>
<field name="spouse_complete_name" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])]}"/>
<field name="spouse_birthdate" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])]}"/>
<field name="children"/>
<separator name="emergency" string="Emergency"/>
<field name="emergency_contact"/>
<field name="emergency_phone" class="o_force_ltr"/>
</group>
<group string="Education">
<field name="certificate"/>
<field name="study_field"/>
<field name="study_school"/>
<separator name="has_work_permit" string="Work Permit"/>
<field name="visa_no"/>
<field name="permit_no"/>
<field name="visa_expire"/>
<field name="work_permit_expiration_date"/>
<field name="work_permit_name" invisible="1"/>
<field name="has_work_permit" widget="work_permit_upload" filename="work_permit_name"/>
</group>
<group string="Citizenship">
<field name="country_id" options='{"no_open": True, "no_create": True}'/>
<field name="identification_id"/>
<field name="passport_id"/>
<field name="gender"/>
<field name="birthday"/>
<field name="place_of_birth"/>
<field name="country_of_birth"/>
</group>
</group>
</page>
<page name="hr_settings" string="HR Settings" groups="hr.group_hr_user">
<group>
<group string='Status' name="active_group">
<field name="employee_type"/>
<field name="user_id" string="Related User" domain="[('share', '=', False)]" context="{'allow_create_employee': False, 'default_create_employee': False}"/>
</group>
<group string="Attendance/Point of Sale" name="identification_group">
<field name="pin" string="PIN Code"/>
<label for="barcode"/>
<div class="o_row">
<field name="barcode"/>
<button string="Generate" class="btn btn-link" type="object" name="generate_random_barcode" attrs="{'invisible': [('barcode', '!=', False)]}"/>
<button name="%(hr_employee_print_badge)d" string="Print Badge" class="btn btn-link" type="action" attrs="{'invisible': [('barcode', '=', False)]}"/>
</div>
</group>
<group string='Payroll' name="payroll_group" invisible="1">
</group>
<group name="application_group" string="Application Settings" invisible="1"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" groups="base.group_user" options="{'post_refresh': 'recipients'}"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<!-- This part of the view_employee_form is defined separately so that the
smartbutton can have lower priority and therefore be last in the list. -->
<record id="view_employee_form_smartbutton" model="ir.ui.view">
<field name="name">view.employee.form.smartbutton</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="view_employee_form"/>
<field name="priority" eval="1000"/>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<field name="related_contacts_count" invisible="1"/>
<button name="action_related_contacts"
class="oe_stat_button"
icon="fa-address-card-o"
type="object"
attrs="{'invisible': ['|', ('id', '=', False), ('related_contacts_count', '=', 0)]}">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value"><field name="related_contacts_count"/></span>
<span class="o_stat_text">Contacts</span>
</div>
</button>
</div>
</field>
</record>
<record id="view_employee_tree" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<tree string="Employees" expand="context.get('expand', False)" multi_edit="1" sample="1" js_class="hr_employee_list">
<header>
<button name="%(plan_wizard_action)d" type="action" string="Launch Plan" context="{'action_plan': True}"/>
</header>
<field name="name" readonly="1"/>
<field name="work_phone" class="o_force_ltr" readonly="1"/>
<field name="work_email"/>
<field name="activity_ids" widget="list_activity"/>
<field name="activity_user_id" optional="hide" string="Activity by" widget="many2one_avatar_user"/>
<field name="activity_date_deadline" widget="remaining_days" options="{'allow_order': '1'}"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id"/>
<field name="address_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="work_location_id" optional="hide"/>
<field name="coach_id" invisible="1"/>
<field name="active" invisible="1"/>
<field name="category_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="hide"/>
<field name="country_id" optional="hide"/>
</tree>
</field>
</record>
<record id="hr_kanban_view_employees" model="ir.ui.view">
<field name="name">hr.employee.kanban</field>
<field name="model">hr.employee</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<kanban class="o_hr_employee_kanban" js_class="hr_employee_kanban" sample="1">
<field name="id"/>
<field name="hr_presence_state"/>
<field name="user_id"/>
<field name="user_partner_id"/>
<field name="hr_icon_display"/>
<field name="show_hr_icon_display"/>
<field name="image_128" />
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record">
<field name="image_1024" class="o_kanban_image_fill_left d-block" preview_image="image_128"
widget="background_image" options="{'zoom': true, 'zoom_delay': 1000}"/>
<div class="oe_kanban_details">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<t t-if="record.show_hr_icon_display.raw_value">
<div class="float-end"
t-if="record.hr_icon_display.raw_value == 'presence_present'"
name="presence_present">
<!-- Employee is present/connected and it is normal according to his work schedule -->
<span class="fa fa-circle text-success" role="img" aria-label="Present"
title="Present" name="presence_present">
</span>
</div>
<div class="float-end"
t-if="record.hr_icon_display.raw_value == 'presence_absent'"
name="presence_absent">
<!-- Employee is not present and it is normal according to his work schedule -->
<span class="fa fa-circle-o text-muted" role="img" aria-label="Absent"
title="Absent" name="presence_absent">
</span>
</div>
<div class="float-end"
t-if="record.hr_icon_display.raw_value == 'presence_absent_active'"
name="presence_absent_active">
<!-- Employee is connected but according to his work schedule,
he should not work for now -->
<span class="fa fa-circle-o text-success" role="img"
aria-label="Present but not active"
title="Present but not active"
name="presence_absent_active">
</span>
</div>
<div class="float-end"
t-if="record.hr_icon_display.raw_value == 'presence_to_define'"
name="presence_to_define">
<!-- Employee is not here but according to his work schedule, he should be connected -->
<span class="fa fa-circle text-warning" role="img"
aria-label="To define" title="To define"
name="presence_to_define">
</span>
</div>
</t>
<field name="name" placeholder="Employee's Name"/>
</strong>
<span t-if="record.job_title.raw_value" class="o_kanban_record_subtitle"><field name="job_title"/></span>
</div>
</div>
<field name="category_ids" widget="many2many_tags" options="{'color_field': 'color'}" groups="hr.group_hr_user"/>
<ul>
<li id="last_login"/>
<li t-if="record.work_email.raw_value" class="o_text_overflow"><field name="work_email" /></li>
<li t-if="record.work_phone.raw_value" class="o_force_ltr"><field name="work_phone" /></li>
</ul>
</div>
<div class="oe_kanban_content o_hr_employee_kanban_bottom position-absolute bottom-0 start-0 end-0 me-2 pe-none">
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left"/>
<div class="oe_kanban_bottom_right float-end pe-auto">
<widget name="hr_employee_chat"/>
<div class="hr_activity_container mb-1 me-n1">
<field name="activity_ids" widget="kanban_activity"/>
</div>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="hr_employee_view_activity" model="ir.ui.view">
<field name="name">hr.employee.activity</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<activity string="Employees">
<field name="id"/>
<templates>
<div t-name="activity-box">
<img t-att-src="activity_image('hr.employee', 'avatar_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
<div>
<field name="name" display="full"/>
<field name="job_id" muted="1" display="full"/>
</div>
</div>
</templates>
</activity>
</field>
</record>
<record id="open_view_employee_list_my" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_mode">kanban,tree,form,activity</field>
<field name="domain">[]</field>
<field name="context">{'chat_icon': True}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_employee_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new employee
</p><p>
With just a quick glance on the Odoo employee screen, you
can easily find all the information you need for each person;
contact data, job position, availability, etc.
</p>
</field>
</record>
<record id="open_view_employee_tree" model="ir.actions.act_window">
<field name="name">Employees Structure</field>
<field name="res_model">hr.employee</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_employee_tree"/>
<field name="domain">[('parent_id','=',False)]</field>
<field name="search_view_id" ref="view_employee_filter"/>
</record>
<record id="open_view_employee_list" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_mode">form,tree</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_employee_filter"/>
</record>
<!-- Employee tree by manager -->
<record id="view_partner_tree2" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<tree string="Employees">
<field name="name"/>
<field name="work_phone" class="o_force_ltr"/>
<field name="work_email"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="coach_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
</tree>
</field>
</record>
<record id="action_hr_employee_create_user" model="ir.actions.server">
<field name="name">Create User</field>
<field name="model_id" ref="model_hr_employee"/>
<field name="binding_model_id" ref="model_hr_employee"/>
<field name="binding_view_types">form</field>
<field name="groups_id" eval="[(4, ref('base.group_erp_manager'))]"/>
<field name="state">code</field>
<field name="code">
action = records.action_create_user()
</field>
</record>
<record id="act_employee_from_department" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_mode">tree,kanban,form</field>
<field name="search_view_id" ref="view_employee_filter"/>
<field name="context">{
"searchpanel_default_department_id": active_id,
"default_department_id": active_id,
"search_default_group_department": 1,
"search_default_department_id": active_id,
"expand": 1}
</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new employee
</p><p>
With just a quick glance on the Odoo employee screen, you
can easily find all the information you need for each person;
contact data, job position, availability, etc.
</p>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_hr_job_form" model="ir.ui.view">
<field name="name">hr.job.form</field>
<field name="model">hr.job</field>
<field name="arch" type="xml">
<form string="Job">
<field name="active" invisible="1"/>
<field name="company_id" invisible="1"/>
<sheet>
<div class="oe_button_box" name="button_box"/>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" placeholder="e.g. Sales Manager"/></h1>
</div>
<notebook>
<page string="Recruitment" name="recruitment_page">
<group>
<group name="recruitment">
<field name="company_id" options="{'no_create': True}" invisible="1" groups="base.group_multi_company"/>
<field name="department_id"/>
<field name="contract_type_id"/>
</group>
<group name="recruitment2">
<label for="no_of_recruitment"/>
<div class="o_row" name="recruitment_target">
<field name="no_of_recruitment" class="o_hr_narrow_field"/>
<span>new Employees</span>
</div>
</group>
</group>
</page>
<page string="Job Summary" name="job_description_page">
<field name="description" options="{'collaborative': true}"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" options="{'open_attachments': True}"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="view_hr_job_tree" model="ir.ui.view">
<field name="name">hr.job.tree</field>
<field name="model">hr.job</field>
<field name="arch" type="xml">
<tree string="Job" sample="1">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="department_id"/>
<field name="no_of_recruitment"/>
<field name="no_of_employee" optional="hide"/>
<field name="expected_employees" optional="hide"/>
<field name="no_of_hired_employee" optional="hide"/>
<field name="message_needaction" invisible="1"/>
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
<field name="company_id" invisible="1"/>
</tree>
</field>
</record>
<record id="hr_job_view_kanban" model="ir.ui.view">
<field name="name">hr.job.kanban</field>
<field name="model">hr.job</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile" sample="1">
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div>
<strong><field name="name"/></strong>
</div>
<div>
<span><field name="department_id"/>&amp;nbsp;</span>
</div>
<div t-if="!selection_mode">
<span>Vacancies : <field name="expected_employees"/></span>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_job_filter" model="ir.ui.view">
<field name="name">hr.job.search</field>
<field name="model">hr.job</field>
<field name="arch" type="xml">
<search string="Jobs">
<field name="name" string="Job Position"/>
<field name="department_id" operator="child_of"/>
<separator/>
<filter name="message_needaction" string="Unread Messages" domain="[('message_needaction', '=', True)]"/>
<separator/>
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
<group expand="0" string="Group By">
<filter string="Department" name="department" domain="[]" context="{'group_by': 'department_id'}"/>
<filter string="Company" name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
<filter string="Employment Type" name="employment_type" domain="[]" context="{'group_by': 'contract_type_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_hr_job" model="ir.actions.act_window">
<field name="name">Job Positions</field>
<field name="res_model">hr.job</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_job_filter"/>
<field name="context">{"search_default_Current":1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Ready to recruit more efficiently?
</p><p>
Let's create a job position.
</p>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="hr_plan_view_search" model="ir.ui.view">
<field name="name">hr.plan.view.search</field>
<field name="model">hr.plan</field>
<field name="arch" type="xml">
<search string="Plan">
<field name="name"/>
<field name="department_id"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
</search>
</field>
</record>
<record id="hr_plan_view_tree" model="ir.ui.view">
<field name="name">hr.plan.view.tree</field>
<field name="model">hr.plan</field>
<field name="arch" type="xml">
<tree string="Planning">
<field name="name"/>
<field name="steps_count"/>
<field name="department_id" optional="show"/>
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
<field name="company_id" invisible="1"/>
</tree>
</field>
</record>
<record id="hr_plan_view_form" model="ir.ui.view">
<field name="name">hr.plan.view.form</field>
<field name="model">hr.plan</field>
<field name="arch" type="xml">
<form string="Planning">
<field name="company_id" invisible="1"/>
<sheet>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<label for="name" string="Plan Name"/>
<h1>
<field name="name" placeholder="e.g. Onboarding"/>
</h1>
</div>
<group>
<field name="department_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="active" invisible="1"/>
</group>
<notebook>
<page string="Activities To Generate">
<field name="plan_activity_type_ids" nolabel="1">
<tree>
<field name="company_id" invisible="1"/>
<field name="activity_type_id"/>
<field name="summary"/>
<field name="responsible"/>
<field name="responsible_id" attrs="{'readonly': [('responsible', '!=', 'other')]}" optional="hide"/>
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="hr_plan_activity_type_view_tree" model="ir.ui.view">
<field name="name">hr.plan.activity.type.view.tree</field>
<field name="model">hr.plan.activity.type</field>
<field name="arch" type="xml">
<tree string="Activities">
<field name="activity_type_id"/>
<field name="summary"/>
<field name="responsible"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="hr_plan_activity_type_view_form" model="ir.ui.view">
<field name="name">hr.plan.activity.type.view.form</field>
<field name="model">hr.plan.activity.type</field>
<field name="arch" type="xml">
<form string="Activity">
<field name="company_id" invisible="1"/>
<sheet>
<group>
<field name="activity_type_id"/>
<field name="summary"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="responsible"/>
<field name="responsible_id" attrs="{'invisible': [('responsible', '!=', 'other')]}"/>
<field name="note"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="hr_plan_action" model="ir.actions.act_window">
<field name="name">Plans</field>
<field name="res_model">hr.plan</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="hr_plan_view_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new plan
</p>
</field>
</record>
<record id="hr_plan_activity_type_action" model="ir.actions.act_window">
<field name="name">Plan Activities</field>
<field name="res_model">hr.plan.activity.type</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new plan activity
</p>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<menuitem
id="menu_hr_root"
name="Employees"
groups="group_hr_manager,group_hr_user,base.group_user"
web_icon="hr,static/description/icon.svg"
sequence="185"/>
<menuitem
id="menu_hr_main"
name="Human Resources"
parent="menu_hr_root"
sequence="0"/>
<menuitem
id="menu_hr_employee_payroll"
name="Employees"
parent="menu_hr_root"
groups="group_hr_user"
sequence="3"/>
<menuitem
id="menu_hr_employee_user"
name="Employees"
action="open_view_employee_list_my"
parent="menu_hr_employee_payroll"
sequence="1"/>
<menuitem
id="menu_hr_employee"
name="Directory"
action="hr_employee_public_action"
parent="menu_hr_root"
sequence="4"/>
<menuitem
id="hr_menu_hr_reports"
name="Reporting"
parent="menu_hr_root"
sequence="95"/>
<menuitem
id="menu_hr_reporting_timesheet"
name="Reporting"
parent="menu_hr_root"
groups="group_hr_manager,group_hr_user"
sequence="99"/>
<menuitem
id="menu_human_resources_configuration"
name="Configuration"
parent="menu_hr_root"
groups="hr.group_hr_user"
sequence="100"/>
<menuitem
id="menu_config_employee"
name="Employee"
parent="menu_human_resources_configuration"
groups="group_hr_user"
sequence="10"/>
<menuitem
id="menu_hr_department_tree"
action="hr_department_tree_action"
parent="menu_config_employee"
sequence="4"
groups="group_hr_user"/>
<menuitem
id="menu_hr_department_kanban"
action="hr_department_kanban_action"
parent="menu_hr_root"
groups="group_hr_user"/>
<menuitem
id="menu_hr_work_location_tree"
action="hr_work_location_action"
parent="menu_config_employee"
sequence="5"
groups="group_hr_user"/>
<menuitem
id="menu_hr_departure_reason_tree"
action="hr_departure_reason_action"
parent="menu_config_employee"
sequence="5"
groups="group_hr_user"/>
<menuitem
id="menu_view_employee_category_form"
name="Tags"
action="open_view_categ_form"
parent="menu_config_employee"
groups="base.group_no_one"
sequence="10"/>
<menuitem
id="menu_config_recruitment"
name="Recruitment"
parent="menu_human_resources_configuration"
groups="group_hr_user"
sequence="20"/>
<menuitem
id="menu_view_hr_job"
action="action_hr_job"
parent="menu_config_recruitment"
sequence="1"/>
<menuitem
id="menu_view_hr_contract_type"
action="hr_contract_type_action"
parent="menu_config_recruitment"
sequence="2"
groups="group_hr_user"/>
<menuitem
id="menu_config_plan"
name="Activity Planning"
parent="menu_human_resources_configuration"
groups="group_hr_user"
sequence="100"/>
<menuitem
id="menu_config_plan_plan"
name="On/Offboarding Plans"
action="hr_plan_action"
parent="menu_config_plan"
groups="group_hr_user"
sequence="100"/>
</data>
</odoo>

View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="hr_work_location_tree_view" model="ir.ui.view">
<field name="name">hr.work.location.view.tree</field>
<field name="model">hr.work.location</field>
<field name="arch" type="xml">
<tree string="Work Location">
<field name="active" invisible="1" />
<field name="name" />
<field name="address_id" />
<field name="company_id" groups="base.group_multi_company" />
<field name="company_id" invisible="1"/>
</tree>
</field>
</record>
<record id="hr_work_location_form_view" model="ir.ui.view">
<field name="name">hr.work.location.view.form</field>
<field name="model">hr.work.location</field>
<field name="arch" type="xml">
<form string="Work Location">
<field name="company_id" invisible="1"/>
<sheet>
<group>
<group>
<field name="active" invisible="1" />
<field name="name" />
<field name="address_id" />
<field name="location_number"/>
</group>
<group>
<field name="company_id" groups="base.group_multi_company" />
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="hr_work_location_action" model="ir.actions.act_window">
<field name="name">Work Locations</field>
<field name="res_model">hr.work.location</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new work location
</p>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" ?>
<odoo><data>
<record id="mail_channel_view_form_" model="ir.ui.view">
<field name="name">mail.channel.view.form.inherit.hr</field>
<field name="model">mail.channel</field>
<field name="inherit_id" ref="mail.mail_channel_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='group_ids']" position="after">
<field name="subscription_department_ids" widget="many2many_tags"
attrs="{'invisible': [('channel_type', '!=', 'channel')]}"
string="Auto Subscribe Departments"/>
</xpath>
</field>
</record>
</data></odoo>

View file

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.hr</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="70"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="Employees" string="Employees" data-key="hr" groups="hr.group_hr_manager">
<h2>Employees</h2>
<div class="row mt16 o_settings_container" name="employees_setting_container">
<div class="col-12 col-lg-6 o_setting_box" id="presence_control_setting" title="Presence of employees">
<div class="o_setting_right_pane">
<span class="o_form_label">Presence Control</span>
<div class="content-group" name="hr_presence_options">
<div class="d-flex">
<field name="module_hr_attendance" class="ml16"/>
<label for="module_hr_attendance" class="o_light_label"/>
</div>
<div class="d-flex">
<field name="hr_presence_control_login" class="ml16"/>
<label for="hr_presence_control_login" class="o_light_label"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
id="presence_reporting_setting"
title="Advanced presence of employees">
<div class="o_setting_left_pane">
<field name="module_hr_presence"/>
</div>
<div class="o_setting_right_pane">
<label for="module_hr_presence"/>
<div class="text-muted" name="hr_presence_options_advanced">
Presence reporting screen, email and IP address control.
</div>
<div class="d-flex mt-1" attrs="{'invisible': [('module_hr_presence', '=', False)]}">
<field name="hr_presence_control_email" class="ml16"/>
<label for="hr_presence_control_email" class="o_light_label"/>
</div>
<div class="d-flex ml32" attrs="{'invisible': ['|', ('module_hr_presence', '=', False), ('hr_presence_control_email', '=', False)]}">
<span class="flex-shrink-0 ml8 me-2">Minimum number of emails to send</span>
<field name="hr_presence_control_email_amount" class="ms-2 oe_inline"/>
</div>
<div class="d-flex" attrs="{'invisible': [('module_hr_presence', '=', False)]}">
<field name="hr_presence_control_ip" class="ml16"/>
<label for="hr_presence_control_ip" class="o_light_label"/>
</div>
<div class="d-flex ml32" attrs="{'invisible': ['|', ('module_hr_presence', '=', False), ('hr_presence_control_ip', '=', False)]}">
<span class="flex-shrink-0 ml8 me-2">IP Addresses (comma-separated)</span>
<field name="hr_presence_control_ip_list" class="ms-2 oe_inline"/>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="enrich_employee_setting">
<div class="o_setting_left_pane">
<field name="module_hr_skills"/>
</div>
<div class="o_setting_right_pane">
<label for="module_hr_skills"/>
<div class="text-muted">
Enrich employee profiles with skills and resumes
</div>
</div>
</div>
</div>
<h2>Work Organization</h2>
<div class="row mt16 o_settings_container" name="work_organization_setting_container">
<div class="col-12 col-lg-6 o_setting_box" id="default_company_schedule_setting">
<div class="o_setting_right_pane">
<label for="resource_calendar_id"/>
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." role="img" aria-label="Values set here are company-specific." groups="base.group_multi_company"/>
<div class="row">
<div class="text-muted col-lg-8">
Set default company schedule to manage your employees working time
</div>
</div>
<div class="content-group">
<div class="mt16">
<field name="resource_calendar_id" required="1"
class="o_light_label"
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]"
context="{'default_company_id': company_id}"/>
</div>
</div>
</div>
</div>
</div>
<h2>Employee Update Rights</h2>
<div class="row mt16 o_settings_container" name="employee_rights_setting_container">
<div class="col-12 col-lg-6 o_setting_box" title="Allow employees to update their own data.">
<div class="o_setting_left_pane">
<field name="hr_employee_self_edit"/>
</div>
<div class="o_setting_right_pane">
<label for="hr_employee_self_edit"/>
<div class="text-muted">
Allow employees to update their own data
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<record id="hr_config_settings_action" model="ir.actions.act_window">
<field name="name">Settings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context">{'module' : 'hr', 'bin_size': False}</field>
</record>
<menuitem id="hr_menu_configuration"
name="Settings"
parent="menu_human_resources_configuration"
sequence="0"
action="hr_config_settings_action"
groups="base.group_system"/>
</odoo>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_partner_view_form" model="ir.ui.view">
<field name="name">res.partner.view.form.inherit.hr</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button name="action_open_employees" type="object" class="oe_stat_button" icon="fa-id-card-o" groups="hr.group_hr_user" attrs="{'invisible': [('employees_count', '=', 0)]}">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value"><field name="employees_count"/></span>
<span class="o_stat_text">Employee(s)</span>
</div>
</button>
</div>
</field>
</record>
</odoo>

View file

@ -0,0 +1,272 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Inherit the preference view to remove title, image and footer -->
<!-- This view is meant to be included in the employee profile view -->
<!-- It ensures that if the 'normal' Preferences view is changed, it's
also reflected in the employee's profile -->
<record id="res_users_view_form_simple_modif" model="ir.ui.view">
<field name="name">res.users.preferences.form.simplified.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<footer position="attributes">
<attribute name="invisible">1</attribute>
</footer>
<h1 position="replace"/>
<xpath expr="//field[@name='image_1920']" position="replace"/>
<xpath expr="//field[@name='company_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</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 name="tz" position="after">
<field name="is_system" invisible="1"/>
</field>
<xpath expr="//button[@name='%(base.action_view_base_language_install)d']" position="attributes">
<attribute name="attrs">{'invisible': [('is_system', '=', False)]}</attribute>
</xpath>
</field>
</record>
<record id="res_users_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="res_users_view_form_simple_modif"/>
<field name="arch" type="xml">
<form position="attributes">
<attribute name="create">false</attribute>
<attribute name="delete">false</attribute>
<attribute name="js_class">hr_employee_profile_form</attribute>
</form>
<notebook position="replace">
<field name="hr_presence_state" invisible="1"/>
<header>
</header>
<sheet>$0</sheet>
</notebook>
<notebook position="before">
<div class="oe_button_box" name="button_box">
<button
id="hr_presence_button"
class="oe_stat_button"
disabled="1"
invisible="context.get('from_my_profile', False)"
attrs="{'invisible': [('hr_presence_state', '=', 'absent')]}">
<div role="img" class="fa fa-fw fa-circle text-success o_button_icon" attrs="{'invisible': [('hr_presence_state', '!=', 'present')]}" aria-label="Available" title="Available"/>
<div role="img" class="fa fa-fw fa-circle text-warning o_button_icon" attrs="{'invisible': [('hr_presence_state', '!=', 'to_define')]}" aria-label="Away" title="Away"/>
<div role="img" class="fa fa-fw fa-circle text-danger o_button_icon" attrs="{'invisible': [('hr_presence_state', '!=', 'absent')]}" aria-label="Not available" title="Not available"/>
<div class="o_stat_info" attrs="{'invisible': [('hr_presence_state', '=', 'present')]}">
<span class="o_stat_text">
Not Connected
</span>
</div>
<div class="o_stat_info" attrs="{'invisible': [('hr_presence_state', '!=', 'present')]}">
<span class="o_stat_value" attrs="{'invisible': [('last_activity_time', '=', False)]}">
<field name="last_activity_time"/>
</span>
<span class="o_stat_value" attrs="{'invisible': [('last_activity_time', '!=', False)]}">
<field name="last_activity"/>
</span>
<span class="o_stat_text">Connected Since</span>
</div>
</button>
</div>
<field name="avatar_128" invisible="1"/>
<field name="image_1920" widget='image' class="oe_avatar" options='{"zoom": true, "preview_image":"avatar_128"}'/>
<div class="oe_title">
<h1>
<field name="name" placeholder="Employee's Name" required="True" readonly="context.get('from_my_profile', False)"/>
</h1>
</div>
<div class="row">
<h2 class="col-lg-6 ps-lg-0">
<field name="job_title" class="w-100" placeholder="Job Position" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</h2>
</div>
<group>
<group>
<field name="can_edit" invisible="1"/>
<field name="mobile_phone" widget="phone" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="work_phone" widget="phone" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
<group>
<field name="work_email" widget="email" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="work_location_id" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="company_id" invisible="1"/>
</group>
<group>
<field name="employee_parent_id" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="coach_id" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
</group>
</notebook>
<notebook position="inside">
<page name="public" string="Work Information">
<div id="o_work_employee_container" class="d-lg-flex"> <!-- These two div are used to position org_chart -->
<div id="o_work_employee_main" class="flex-grow-1">
<group string="Location">
<field name="department_id" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="address_id"
context="{'show_address': 1}"
options='{"always_reload": True, "highlight_first_line": True}'
attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
<group name="managers" string="Approvers" class="hide-group-if-empty">
<!-- overridden in other modules -->
</group>
</div>
</div>
</page>
<page name="personal_information" string="Private Information">
<group>
<group string="Contact Information">
<field name="employee_ids" invisible="1"/>
<field name="address_home_id" invisible="1"/>
<label for="private_street" string="Private Address"/>
<div class="o_address_format">
<field name="private_street" placeholder="Street..." class="o_address_street"/>
<field name="private_street2" placeholder="Street 2..." class="o_address_street"/>
<field name="private_city" placeholder="City" class="o_address_city"/>
<field name="private_state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}" context="{'default_country_id': private_country_id}"/>
<field name="private_zip" placeholder="ZIP" class="o_address_zip"/>
<field name="private_country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
</div>
<field name="private_email" string="Email" attrs="{'readonly': [('can_edit', '=', False)], 'invisible': [('address_home_id', '=', False)]}"/>
<field name="employee_phone" string="Phone" class="o_force_ltr" attrs="{'readonly': [('can_edit', '=', False)], 'invisible': [('address_home_id', '=', False)]}"/>
<field name="private_lang" string="Language" attrs="{'readonly': [('can_edit', '=', False)], 'invisible': [('address_home_id', '=', False)]}"/>
<field name="employee_bank_account_id" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="km_home_work" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
<group string="Citizenship">
<field name="employee_country_id" options='{"no_open": True, "no_create": True}' attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="identification_id" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="passport_id" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="gender" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="birthday" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="place_of_birth" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="country_of_birth" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
<group string="Marital Status">
<field name="marital" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="spouse_complete_name" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])], 'readonly': [('can_edit', '=', False)]}"/>
<field name="spouse_birthdate" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])], 'readonly': [('can_edit', '=', False)]}"/>
</group>
<group string="Education">
<field name="certificate" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="study_field" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="study_school" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
<group string="Dependant">
<field name="children" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
<group string="Emergency">
<field name="emergency_contact" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="emergency_phone" widget="phone" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
<group string="Work Permit" name="has_work_permit">
<field name="visa_no" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="permit_no" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="visa_expire" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
</group>
</page>
<page name="hr_settings" string="HR Settings">
<group>
<group string='Status' name="active_group">
<field name="employee_type" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
<group string="Attendance" name="identification_group">
<field name="pin" attrs="{'readonly': [('can_edit', '=', False)]}"/>
<field name="barcode" attrs="{'readonly': [('can_edit', '=', False)]}"/>
</group>
</group>
</page>
</notebook>
</field>
</record>
<record id="view_users_simple_form_inherit_hr" model="ir.ui.view">
<field name="name">view.users.simple.form.inherit.hr</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_simple_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='mobile']" position="after">
<field name="create_employee_id" force_save="1" invisible="1"/>
<field name="create_employee" force_save="1" string="Create Employee" invisible="not context.get('allow_create_employee', True)" attrs="{'invisible': [('create_employee_id', '>', 0)]}"/>
</xpath>
</field>
</record>
<record id="view_users_simple_form" model="ir.ui.view">
<field name="name">view.users.simple.form.hr</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_simple_form"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<sheet position="after">
<footer>
<button string="Save" special="save" class="btn btn-primary"/>
<button string="Cancel" special="cancel" class="btn btn-secondary"/>
</footer>
</sheet>
</field>
</record>
<record id="res_users_action_my" model="ir.actions.act_window">
<field name="name">Change my Preferences</field>
<field name="res_model">res.users</field>
<field name="view_mode">form</field>
<field name="context">{'from_my_profile': True}</field>
<field name="view_id" ref="hr.res_users_view_form_profile"/>
</record>
<record id="hr_employee_action_from_user" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[('user_id', '=', active_id)]</field>
</record>
<record id="res_users_view_form" model="ir.ui.view">
<field name="name">res.users.form.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<field name="share" invisible="1"/>
<field name="employee_ids" invisible="1"/>
<field name="employee_id" invisible="1"/>
<button string="Create employee"
type="object" name="action_create_employee"
attrs="{'invisible': ['|', '|', ('id', '=', False), ('share', '=', True), ('employee_id', '!=', False)]}"/>
<!-- share is not correctly recomputed because it depends on fields of reified view => invisible before saving (id=False) -->
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button name="%(hr_employee_action_from_user)d"
class="oe_stat_button"
icon="fa-users"
attrs="{'invisible': [('employee_count', '=', 0)]}"
context="{'active_test': False}"
type="action">
<field name="employee_count" widget="statinfo" string="Employee(s)"/>
</button>
</xpath>
</field>
</record>
</data>
</odoo>