mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-26 17:12:04 +02:00
630 lines
32 KiB
XML
630 lines
32 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="hr_employee_view_search" model="ir.ui.view">
|
|
<field name="name">hr.employee.skill.search</field>
|
|
<field name="model">hr.employee</field>
|
|
<field name="inherit_id" ref="hr.view_employee_filter"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='job_id']" position="after">
|
|
<field name="employee_skill_ids"/>
|
|
<field name="resume_line_ids" string="Resume" filter_domain="
|
|
['|',
|
|
('version_ids.job_title', 'ilike', self),
|
|
'|',
|
|
('resume_line_ids.name', 'ilike', self),
|
|
('resume_line_ids.description', 'ilike', self),
|
|
]"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_employee_public_view_search" model="ir.ui.view">
|
|
<field name="name">hr.employee.public.skill.search</field>
|
|
<field name="model">hr.employee.public</field>
|
|
<field name="inherit_id" ref="hr.hr_employee_public_view_search"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='job_id']" position="after">
|
|
<field name="employee_skill_ids"/>
|
|
<field name="resume_line_ids" string="Resume" filter_domain="
|
|
['|',
|
|
('version_ids.job_title', 'ilike', self),
|
|
'|',
|
|
('resume_line_ids.name', 'ilike', self),
|
|
('resume_line_ids.description', 'ilike', self),
|
|
]"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="resume_line_view_form" model="ir.ui.view">
|
|
<field name="name">hr.resume.line.form</field>
|
|
<field name="model">hr.resume.line</field>
|
|
<field name="priority">1</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Resume">
|
|
<sheet>
|
|
<field name="line_type_id" widget="selection_badge"/>
|
|
<div class="oe_title">
|
|
<label for="name" string="Title"/>
|
|
<h1>
|
|
<field name="name" placeholder="e.g. Odoo Inc." required="True"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group invisible="not is_course">
|
|
<field name="course_type" widget="radio" invisible="1"/>
|
|
<field name="external_url" placeholder="e.g. https://duolingo.com/course/xyz"/>
|
|
</group>
|
|
<group id="resume_line_dates">
|
|
<label id="date_start_label" for="date_start" string="Duration" invisible="is_course"/>
|
|
<div class="o_row" invisible="is_course">
|
|
<field name="date_start"/>
|
|
<i class="fa fa-long-arrow-right mx-2" aria-label="Arrow icon" title="Arrow"/>
|
|
<field name="date_end" placeholder="Forever"/>
|
|
</div>
|
|
<label for="date_start" string="Date" invisible="not is_course"/>
|
|
<field name="date_start" nolabel="1" invisible="not is_course"/>
|
|
<label for="duration" string="Duration" invisible="not is_course"/>
|
|
<span invisible="not is_course">
|
|
<field name="duration" style="width: 4ch;"/> hours
|
|
</span>
|
|
<field name="certificate_filename" invisible="1"/>
|
|
<field name="certificate_file" filename="certificate_filename"/>
|
|
</group>
|
|
</group>
|
|
<field name="resume_line_properties"/>
|
|
<field name="description" placeholder="Description" class="o_resume_html"/>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="resume_line_view_form_inherit" model="ir.ui.view">
|
|
<field name="name">hr.resume.line.inherit.form</field>
|
|
<field name="model">hr.resume.line</field>
|
|
<field name="priority">100</field>
|
|
<field name="mode">primary</field>
|
|
<field name="inherit_id" ref="hr_skills.resume_line_view_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='course_type']" position="before">
|
|
<field name="employee_id" string="Employee" invisible="not is_course"/>
|
|
</xpath>
|
|
<xpath expr="//label[@id='date_start_label']" position="before">
|
|
<field name="employee_id" string="Employee" invisible="is_course"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_employee_view_form" model="ir.ui.view">
|
|
<field name="name">hr.employee.view.form.inherit.resume</field>
|
|
<field name="model">hr.employee</field>
|
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
|
<field name="arch" type="xml">
|
|
<div id="o_employee_left" position="inside">
|
|
<field name="employee_id" invisible="1"/> <!-- For skills_one2many and resume_one2many -->
|
|
<separator string="Resume" class="mb-4"/>
|
|
<!-- This field uses a custom list view rendered by the 'resume_one2many' widget.
|
|
Adding fields in the list arch below makes them accessible to the widget
|
|
-->
|
|
<widget name="internal_resume_lines"/>
|
|
<field mode="list" nolabel="1" name="resume_line_ids" widget="resume_one2many">
|
|
<list>
|
|
<field name="line_type_id"/>
|
|
<field name="name"/>
|
|
<field name="description"/>
|
|
<field name="date_start"/>
|
|
<field name="date_end"/>
|
|
<field name="is_course"/>
|
|
<field name="duration"/>
|
|
<field name="external_url"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
<div id="o_work_information_right" position="inside">
|
|
<field mode="list" nolabel="1" name="current_employee_skill_ids" widget="skills_one2many"
|
|
context="{'no_timeline': not employee_skill_ids}">
|
|
<list
|
|
class="o_employee_skills"
|
|
decoration-muted="valid_to and valid_to < context_today().strftime('%Y-%m-%d')"
|
|
decoration-danger="valid_to and valid_to <= (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d') and valid_to > context_today().strftime('%Y-%m-%d')"
|
|
decoration-warning="valid_to and valid_to <= (context_today() + relativedelta(months=3)).strftime('%Y-%m-%d') and valid_to > (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d')">
|
|
<field name="skill_id"/>
|
|
<field name="skill_level_id"/>
|
|
<field name="level_progress" widget="progressbar"/>
|
|
<field name="skill_type_id" optional="hidden"/>
|
|
<field name="valid_to" column_invisible="1"/>
|
|
<field name="is_certification" column_invisible="1"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
<page name="resume" position="after">
|
|
<page name="certification" string="Certifications" invisible="not display_certification_page">
|
|
<field name="certification_ids" mode="list" widget="one2many" nolabel="1" context="{'form_view_ref': 'hr_skills.employee_skill_view_inherit_certificate_form', 'dialog_size': 'large', 'default_employee_id': id, 'certificate_skill': True}">
|
|
<list
|
|
decoration-muted="valid_to and valid_to < context_today().strftime('%Y-%m-%d')">
|
|
<field name="skill_id" width="300" string="Certification"/>
|
|
<field name="valid_from" string="From" widget="formatted_date" options="{
|
|
'month_format': 'short',
|
|
}"/>
|
|
<field name="valid_to" string="To" widget="formatted_date" options="{
|
|
'month_format': 'short',
|
|
'color': {
|
|
'danger': 'valid_to and valid_to <= (context_today() + relativedelta(days=7)).strftime(\'%Y-%m-%d\') and valid_to > context_today().strftime(\'%Y-%m-%d\')',
|
|
'warning': 'valid_to and valid_to <= (context_today() + relativedelta(months=3)).strftime(\'%Y-%m-%d\') and valid_to > (context_today() + relativedelta(days=7)).strftime(\'%Y-%m-%d\')'
|
|
}
|
|
}"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
</page>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<record id="hr_employee_public_view_form_inherit" model="ir.ui.view">
|
|
<field name="name">hr.employee.public.view.form.inherit.resume</field>
|
|
<field name="model">hr.employee.public</field>
|
|
<field name="inherit_id" ref="hr.hr_employee_public_view_form"/>
|
|
<field name="arch" type="xml">
|
|
<page name="resume" position="inside">
|
|
<div class="row">
|
|
<div class="o_hr_skills_editable o_hr_skills_group o_group_resume col-lg-7 d-flex flex-column">
|
|
<separator string="Resume" class="mb-4"/>
|
|
<!-- This field uses a custom list view rendered by the 'resume_one2many' widget.
|
|
Adding fields in the list arch below makes them accessible to the widget
|
|
-->
|
|
<widget name="internal_resume_lines"/>
|
|
<field mode="list" nolabel="1" name="resume_line_ids" widget="resume_one2many">
|
|
<list>
|
|
<field name="line_type_id"/>
|
|
<field name="name"/>
|
|
<field name="description"/>
|
|
<field name="date_start"/>
|
|
<field name="date_end"/>
|
|
<field name="is_course"/>
|
|
<field name="duration"/>
|
|
<field name="external_url"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
<div class="o_hr_skills_editable o_hr_skills_group o_group_skills col-lg-5 px-0 ps-lg-5 pe-lg-0">
|
|
<field name="employee_id" invisible="1"/>
|
|
<field mode="list" nolabel="1" name="current_employee_skill_ids" widget="skills_one2many" readonly="1">
|
|
<list
|
|
no_open="1"
|
|
decoration-muted="valid_to and valid_to < context_today().strftime('%Y-%m-%d')"
|
|
decoration-danger="valid_to and valid_to <= (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d') and valid_to > context_today().strftime('%Y-%m-%d')"
|
|
decoration-warning="valid_to and valid_to <= (context_today() + relativedelta(months=3)).strftime('%Y-%m-%d') and valid_to > (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d')">
|
|
<field name="skill_type_id" optional="hidden"/>
|
|
<field name="skill_id"/>
|
|
<field name="skill_level_id"/>
|
|
<field name="level_progress" widget="progressbar"/>
|
|
<field name="valid_to" column_invisible="1"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
</div>
|
|
</page>
|
|
<page name="resume" position="after">
|
|
<page name="certification" string="Certifications">
|
|
<field name="certification_ids" mode="list" nolabel="1" readonly="1">
|
|
<list
|
|
no_open="1"
|
|
decoration-muted="valid_to and valid_to < context_today().strftime('%Y-%m-%d')">
|
|
<field name="skill_id" width="300" string="Certification"/>
|
|
<field name="valid_from" string="From" widget="formatted_date" options="{
|
|
'month_format': 'short',
|
|
}"/>
|
|
<field name="valid_to" string="To" widget="formatted_date" options="{
|
|
'month_format': 'short',
|
|
'color': {
|
|
'danger': 'valid_to and valid_to <= (context_today() + relativedelta(days=7)).strftime(\'%Y-%m-%d\') and valid_to > context_today().strftime(\'%Y-%m-%d\')',
|
|
'warning': 'valid_to and valid_to <= (context_today() + relativedelta(months=3)).strftime(\'%Y-%m-%d\') and valid_to > (context_today() + relativedelta(days=7)).strftime(\'%Y-%m-%d\')'
|
|
}
|
|
}"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
</page>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- hr_resume_line views -->
|
|
|
|
<record id="hr_resume_line_type_tree_view" model="ir.ui.view">
|
|
<field name="name">hr.resume.line.type.list.view</field>
|
|
<field name="model">hr.resume.line.type</field>
|
|
<field name="arch" type="xml">
|
|
<list name="Resume Sections" editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="is_course" string="Course?"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_resume_type_action" model="ir.actions.act_window">
|
|
<field name="name">Resume Sections</field>
|
|
<field name="res_model">hr.resume.line.type</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
|
|
<record id="hr_resume_line_list_view" model="ir.ui.view">
|
|
<field name="name">hr.resume.line.list.view</field>
|
|
<field name="model">hr.resume.line</field>
|
|
<field name="arch" type="xml">
|
|
<list name="Resume Lines" editable="bottom" multi_edit="1">
|
|
<field name="employee_id"/>
|
|
<field name="name" string="Training Title"/>
|
|
<field name="date_start" string="Date"/>
|
|
<field name="course_type" string="Type" column_invisible="1"/>
|
|
<field name="line_type_id" string="Resume Section" optional="show" required="1" domain="[('is_course', '=', True)]"/>
|
|
<field name="certificate_filename" column_invisible="1"/>
|
|
<field name="certificate_file" filename="certificate_filename" widget="binary"/>
|
|
<field name="duration" string="Number of Hours" optional="hide"/>
|
|
<field name="external_url" optional="hide" column_invisible="1"/>
|
|
<field name="description" optional="hide"/>
|
|
<field name="resume_line_properties" optional="hide"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_resume_line_kanban_view" model="ir.ui.view">
|
|
<field name="name">hr.resume.line.kanban.view</field>
|
|
<field name="model">hr.resume.line</field>
|
|
<field name="arch" type="xml">
|
|
<kanban class="o_hr_employee_kanban">
|
|
<templates>
|
|
<t t-name="card" class="flex-row">
|
|
<main class="ms-2">
|
|
<div class="d-flex mb-2">
|
|
<field name="name" class="fw-bolder fs-5 w-100"/>
|
|
<div class="flex-shrink-1 text-end align-self-baseline" style="min-width: fit-content;">
|
|
<field name="course_type" widget="badge"/>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex">
|
|
<div class="d-flex w-100">
|
|
<field name="employee_id" widget="many2one_avatar_employee"/>
|
|
<field name="employee_id" class="ms-1"/>
|
|
</div>
|
|
<field name="date_start" class="flex-shrink-1 text-end" style="min-width: fit-content;"/>
|
|
</div>
|
|
</main>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_resume_line_calendar_view" model="ir.ui.view">
|
|
<field name="name">hr.resume.line.calendar.view</field>
|
|
<field name="model">hr.resume.line</field>
|
|
<field name="arch" type="xml">
|
|
<calendar date_start="date_start" mode="year" color="color">
|
|
<field name="course_type" filters="1"/>
|
|
</calendar>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_resume_lines_filter" model="ir.ui.view">
|
|
<field name="name">hr.resume.line.search</field>
|
|
<field name="model">hr.resume.line</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Resume Lines">
|
|
<searchpanel view_types="list,kanban">
|
|
<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_resume_lines_training_action" model="ir.actions.act_window">
|
|
<field name="name">Training Attendances</field>
|
|
<field name="res_model">hr.resume.line</field>
|
|
<field name="view_mode">list,kanban,form,calendar</field>
|
|
<field name="domain">[('line_type_id.is_course', '=', True)]</field>
|
|
<field name="search_view_id" ref="view_resume_lines_filter"/>
|
|
<field name="view_ids" eval="[(5, 0, 0),
|
|
(0, 0, {'view_mode': 'list', 'view_id': False}),
|
|
(0, 0, {'view_mode': 'kanban', 'view_id': False}),
|
|
(0, 0, {'view_mode': 'calendar', 'view_id': False}),
|
|
(0, 0, {'view_mode': 'form', 'view_id': ref('hr_skills.resume_line_view_form_inherit')})]"/>
|
|
</record>
|
|
|
|
<menuitem
|
|
id="menu_human_resources_configuration_resume"
|
|
name="Resume"
|
|
parent="hr.menu_human_resources_configuration"
|
|
sequence="15"
|
|
groups="base.group_no_one"/>
|
|
|
|
<menuitem
|
|
id="hr_resume_line_type_menu"
|
|
name="Sections"
|
|
action="hr_resume_type_action"
|
|
parent="hr_skills.menu_human_resources_configuration_resume"
|
|
sequence="3"
|
|
groups="base.group_no_one"/>
|
|
|
|
<!-- Skills -->
|
|
|
|
<record id="hr_skill_type_action" model="ir.actions.act_window">
|
|
<field name="name">Skill Types</field>
|
|
<field name="res_model">hr.skill.type</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
|
|
<record id="employee_skill_level_view_tree" model="ir.ui.view">
|
|
<field name="name">hr.skill.level.list</field>
|
|
<field name="model">hr.skill.level</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Skill Levels" class="o_skill_level_tree" editable="bottom" default_order="level_progress desc">
|
|
<field name="name"/>
|
|
<field name="level_progress" widget="progressbar" options="{'editable': true}" width="250"/>
|
|
<field name="default_level" widget="boolean_toggle_load"/>
|
|
<field name="technical_is_new_default" column_invisible="1"/> <!-- needs to be here to be accessible for the front-end -->
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="employee_skill_view_tree" model="ir.ui.view">
|
|
<field name="name">hr.skill.list</field>
|
|
<field name="model">hr.skill</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Skill Levels">
|
|
<field name="name"/>
|
|
<field name="skill_type_id"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="employee_skill_level_view_form" model="ir.ui.view">
|
|
<field name="name">hr.skill.level.form</field>
|
|
<field name="model">hr.skill.level</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Skill Level">
|
|
<sheet>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="level_progress" string="Progress (%)"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="employee_skill_view_form" model="ir.ui.view">
|
|
<field name="name">hr.employees.skill.form</field>
|
|
<field name="model">hr.employee.skill</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Skills" class="o_hr_skills_dialog_form">
|
|
<sheet>
|
|
<group>
|
|
<field name="employee_id" widget="many2one_avatar_employee" invisible="not context.get('show_employee', False)"/>
|
|
<field name="skill_type_id" widget="selection_badge" string="Category"/>
|
|
<field name="skill_id" widget="selection_badge"
|
|
context="{'default_skill_type_id': skill_type_id}"
|
|
domain="[('skill_type_id', '=', skill_type_id)]"
|
|
invisible="not skill_type_id"/>
|
|
<field name="skill_level_id"
|
|
readonly="not skill_id" widget="selection_badge"
|
|
invisible="levels_count <= 1"
|
|
options="{'no_open': True, 'no_create': True}"
|
|
context="{'default_skill_type_id': skill_type_id}"/>
|
|
<label for="valid_from" string="Validity" class="me-1" invisible="not is_certification"/>
|
|
<div class="d-flex flex-row" invisible="not is_certification">
|
|
<field name="valid_from" nolabel="1" class="w-25" required="is_certification"/>
|
|
<label for="valid_to" string="To" class="mx-1"/>
|
|
<field name="valid_to" placeholder="indefinite" nolabel="1" class="w-25"/>
|
|
</div>
|
|
</group>
|
|
<div class="alert alert-warning ps-3" role="alert" invisible="not display_warning_message">
|
|
The end date must be after the start date.
|
|
</div>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="employee_skill_view_inherit_certificate_form" model="ir.ui.view">
|
|
<field name="name">hr.employees.skill.inherit.certificate.form</field>
|
|
<field name="model">hr.employee.skill</field>
|
|
<field name="inherit_id" ref="employee_skill_view_form"/>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<field name="skill_type_id" position="attributes">
|
|
<attribute name="domain">[('is_certification', '=', True)]</attribute>
|
|
<attribute name="invisible">certification_skill_type_count <= 1</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_skill_view_form" model="ir.ui.view">
|
|
<field name="name">hr.skill.form</field>
|
|
<field name="model">hr.skill</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Skills">
|
|
<sheet>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="skill_type_id"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_skill_view_search" model="ir.ui.view">
|
|
<field name="name">hr.skill.view.search</field>
|
|
<field name="model">hr.skill</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Skill">
|
|
<field name="name" string="Skill"/>
|
|
<field name="skill_type_id" string="Skill Type"/>
|
|
<separator/>
|
|
<group>
|
|
<filter string="Skill Type" name="group_skill_type_id" domain="[]" context="{'group_by':'skill_type_id'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_skill_type_view_search" model="ir.ui.view">
|
|
<field name="name">hr.skill.type.search</field>
|
|
<field name="model">hr.skill.type</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Skill Type">
|
|
<field name="name" string="Skill Types"/>
|
|
<field name="skill_ids"/>
|
|
<field name="skill_level_ids"/>
|
|
<field name="active" invisible="1"/>
|
|
<filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
|
|
<separator/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_skill_type_view_tree" model="ir.ui.view">
|
|
<field name="name">hr.skill.type.list</field>
|
|
<field name="model">hr.skill.type</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Skill Types">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="display_name" string="Skill Types"/>
|
|
<field name="color" widget="color_picker" optional="show"/>
|
|
<field name="skill_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
|
<field name="skill_level_ids" widget="many2many_tags_skills"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_employee_skill_type_view_form" model="ir.ui.view">
|
|
<field name="name">hr.skill.type.form</field>
|
|
<field name="model">hr.skill.type</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Skill Type">
|
|
<field name="id" invisible="1"/>
|
|
<sheet>
|
|
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
|
<div class="oe_title">
|
|
<label for="name" string="Skill Type"/>
|
|
<h1>
|
|
<field name="name" placeholder="e.g. Languages" required="True"/>
|
|
<field name="active" invisible="1"/>
|
|
</h1>
|
|
<group name="name">
|
|
<field name="color" widget="color_picker"/>
|
|
<field name="is_certification" widget="boolean_toggle" options="{'autosave': False}"/>
|
|
</group>
|
|
</div>
|
|
<group string="Skills">
|
|
</group>
|
|
<field name="skill_ids" nolabel="1" context="{'default_skill_type_id': id}">
|
|
<list editable="bottom">
|
|
<field name="sequence" widget="handle" />
|
|
<field name="name"/>
|
|
</list>
|
|
</field>
|
|
<group string="Levels">
|
|
</group>
|
|
<field name="skill_level_ids" nolabel="1" context="{'default_skill_type_id': id}"/>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_employee_skill_view_list" model="ir.ui.view">
|
|
<field name="name">hr.employees.skill.list</field>
|
|
<field name="model">hr.employee.skill</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Certification"
|
|
action="open_hr_employee_skill_modal"
|
|
type="object"
|
|
create="0"
|
|
expand="1"
|
|
decoration-muted="valid_to and valid_to < context_today().strftime('%Y-%m-%d')"
|
|
decoration-danger="valid_to and valid_to <= (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d') and valid_to > context_today().strftime('%Y-%m-%d')"
|
|
decoration-warning="valid_to and valid_to <= (context_today() + relativedelta(months=3)).strftime('%Y-%m-%d') and valid_to > (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d')">
|
|
<header>
|
|
<button name="open_hr_employee_skill_modal" string="New" type="object" class="btn-primary" display="always"/>
|
|
</header>
|
|
<field name="employee_id" widget="many2one_avatar_employee"/>
|
|
<field name="skill_id" string="Certification"/>
|
|
<field name="skill_level_id" optional="hide"/>
|
|
<field name="skill_type_id" optional="hide"/>
|
|
<field name="valid_from" string="From" widget="formatted_date" options="{'month_format': 'short'}" width="300"/>
|
|
<field name="valid_to" string="To" widget="formatted_date" options="{'month_format': 'short'}" width="300"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_employee_skill_view_search" model="ir.ui.view">
|
|
<field name="name">hr.employee.skill.view.search</field>
|
|
<field name="model">hr.employee.skill</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field string="Certification" name="skill_id"/>
|
|
<field name="employee_id"/>
|
|
<filter string="Valid certification" name="valid_certification"
|
|
domain="[
|
|
'|',
|
|
('valid_to', '=', False),
|
|
('valid_to', '>', 'today')
|
|
]"/>
|
|
<filter string='Certification' name="group_by_certification" context="{'group_by': 'skill_id'}"/>
|
|
<filter string='Type' name="group_by_type" context="{'group_by': 'skill_type_id'}"/>
|
|
<filter string='Employee' name="group_by_employee" context="{'group_by': 'employee_id'}"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_hr_employee_skill_certification" model="ir.actions.act_window">
|
|
<field name="name">Certifications</field>
|
|
<field name="res_model">hr.employee.skill</field>
|
|
<field name="path">certifications</field>
|
|
<field name="domain">[('is_certification', '=', True)]</field>
|
|
<field name="context">{'show_employee': True, 'search_default_group_by_type': 1}</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="view_ids" eval="[(5, 0, 0),
|
|
(0, 0, {'view_mode': 'list', 'view_id': False}),
|
|
(0, 0, {'view_mode': 'form', 'view_id': ref('employee_skill_view_inherit_certificate_form')})]"/>
|
|
</record>
|
|
|
|
<menuitem
|
|
id="hr_skill_type_menu"
|
|
name="Skill Types"
|
|
action="hr_skill_type_action"
|
|
parent="hr.menu_config_employee"
|
|
sequence="7"
|
|
groups="hr.group_hr_user"/>
|
|
|
|
<menuitem
|
|
id="hr_employee_skill_report_menu"
|
|
name="Skills"
|
|
parent="hr.hr_menu_hr_reports"
|
|
sequence="15"/>
|
|
|
|
<menuitem
|
|
id="hr_skill_learning_menu"
|
|
name="Learning"
|
|
parent="hr.menu_hr_root"
|
|
sequence="93"
|
|
groups="hr.group_hr_user"/>
|
|
|
|
<menuitem
|
|
id="hr_certification_menu"
|
|
name="Certifications"
|
|
parent="hr_skill_learning_menu"
|
|
action="action_hr_employee_skill_certification"
|
|
sequence="94"/>
|
|
|
|
<menuitem
|
|
id="menu_learnings_training_attendances"
|
|
name="Training Attendances"
|
|
action="hr_resume_lines_training_action"
|
|
parent="hr_skill_learning_menu"
|
|
sequence="95"/>
|
|
</odoo>
|