19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:00 +01:00
parent a1137a1456
commit e1d89e11e3
2789 changed files with 1093187 additions and 605897 deletions

View file

@ -6,9 +6,11 @@
<field name="inherit_id" ref="hr.hr_department_view_kanban"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('o_kanban_manage_reports')]" position="inside">
<a role="menuitem" class="dropdown-item" name="%(action_open_skills_log_department)d" type="action">
Skills History
</a>
<div role="menuitem">
<a class="dropdown-item" name="%(action_open_skills_log_department)d" type="action">
Skills History
</a>
</div>
</xpath>
</field>
</record>

View file

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_employee_cv">
<t t-set="full_width" t-value="True"/>
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<div class="o_employee_cv page">
<t t-call="hr_skills.report_employee_cv_company"/>
<t t-call="hr_skills.report_employee_cv_sidepanel"/>
<t t-call="hr_skills.report_employee_cv_main_panel"/>
<p class="o_new_page"/>
</div>
</t>
</t>
</template>
<template id="report_employee_cv_company">
<div class="o_company row">
<div class="col-12 mb-4">
<img t-if="o.company_id.logo" t-att-src="image_data_uri(o.company_id.logo)" style="max-height: 45px;" alt="Logo"/>
<div class="oe_structure"></div>
</div>
<div class="col-12 mb-4" style="font-weight: bold;">
<span t-out="o.company_id.partner_id.name">Demo Company Name</span>
</div>
<div class="col-12">
<span t-field="o.company_id.partner_id" t-options='{"widget": "contact", "fields": ["address"], "no_marker": True}'>Demo Address</span>
</div>
</div>
</template>
<template id="report_employee_cv_sidepanel">
<div class="oe_structure"></div>
<div class="o_sidebar" t-attf-style="
background: #{color_primary};
background-color: #{color_primary};">
<div class="o_profile">
<img class="img img-fluid rounded-circle o_profile_image" t-attf-src="data:image/png;base64,#{o.image_128}" alt="" t-if="o.image_128"/>
<h1 class="o_profile_name mt-2" t-field="o.name">Marc Demo</h1>
<h3 class="o_profile_job mb-2" t-field="o.job_id">Software Developer</h3>
</div>
<div class="oe_structure"></div>
<div class="o_sidebar_section" t-if="show_contact">
<ul class="o_social">
<li class="email" t-if="o.company_id.email">
<i class="fa fa-envelope pe-2"/>
<a t-attf-href="mailto: #{o.company_id.email}" t-field="o.company_id.email">demo@email.com</a>
</li>
<li class="phone" t-if="o.company_id.phone">
<i class="fa fa-phone pe-2"/>
<a t-attf-href="tel:#{o.company_id.phone}" t-field="o.company_id.phone">+1234567890</a>
</li>
<li class="website" t-if="o.company_id.website">
<i class="fa fa-globe pe-2"/>
<a t-attf-href="tel:#{o.company_id.website}" t-field="o.company_id.website">www.demo.com</a>
</li>
</ul>
</div>
</div>
<div class="oe_structure"></div>
</template>
<template id="report_employee_cv_main_panel">
<div class="oe_structure"></div>
<t t-foreach="resume_lines[o]" t-as="line_type">
<div class="o_main_panel">
<div class="o_main_panel_section">
<h2 class="o_main_panel_title mt-4" t-attf-style="color: #{color_secondary};">
<span class="o_main_panel_icon" t-attf-style="background: #{color_secondary};">
<i class="fa fa-briefcase"/>
</span>
<span t-out="line_type">Experience</span>
</h2>
<t t-foreach="resume_lines[o][line_type]" t-as="resume_line">
<div class="o_main_panel_resume_title ps-5">
<div class="o_main_panel_resume_title_job">
<h3 class="o_main_panel_resume_job" t-field="resume_line.name">Software Developer</h3>
</div>
<div class="o_main_panel_resume_title_dates">
<t t-set="present">Present</t>
<div class="o_main_panel_resume_year">
<span t-out="resume_line.date_start.year">2022</span> - <span t-out="resume_line.date_end.year if resume_line.date_end else present">2023</span>
</div>
</div>
</div>
<div class="o_main_panel_resume_description ps-5 w-auto">
<p t-field="resume_line.description" data-oe-demo="Odoo India pvt. Ltd"/>
</div>
</t>
</div>
</div>
</t>
<div class="oe_structure"></div>
<t t-set="has_languages" t-value="skill_type_language and any(skill_line.skill_type_id == skill_type_language for skill_line in o.employee_skill_ids)"/>
<div class="o_main_panel mt-4" t-if="has_languages">
<div class="o_main_panel_section" t-if="skill_type_language">
<h2 class="o_main_panel_title" t-attf-style="color: #{color_secondary};">
<span class="o_main_panel_icon" t-attf-style="background: #{color_secondary};">
<i class="fa fa-language"/>
</span>
Languages
</h2>
<t t-foreach="o.employee_skill_ids" t-as="skill_line">
<t t-if="skill_line.skill_type_id == skill_type_language">
<div class="o_main_panel_resume_title ps-5 pb-2">
<div class="o_main_panel_resume_title_job">
<h3 class="o_main_panel_resume_job"><span t-out="skill_line.skill_id.name">English</span> - <span t-out="skill_line.skill_level_id.name">Fluent</span></h3>
</div>
</div>
</t>
</t>
</div>
</div>
<div class="oe_structure"></div>
<t t-set="has_skills" t-value="show_skills and any(skill_line.skill_type_id != skill_type_language for skill_line in o.employee_skill_ids)"/>
<div class="o_main_panel mt-4" t-if="has_skills">
<div class="o_main_panel_section">
<h2 class="o_main_panel_title" t-attf-style="color: #{color_secondary};">
<span class="o_main_panel_icon" t-attf-style="background: #{color_secondary};">
<i class="fa fa-rocket"/>
</span>
Skills
</h2>
<t t-set="valid_skills" t-value="[skill for skill in o.employee_skill_ids if skill.skill_type_id != skill_type_language]"/>
<t t-foreach="[valid_skills[n:n+2] for n in range(0, len(valid_skills), 2)]" t-as="skills_pair">
<div class="o_main_panel_skills row ps-5">
<t t-foreach="skills_pair" t-as="skill_line">
<div class="o_main_panel_skill_line col-6 pe-4" t-if="skill_line.skill_type_id != skill_type_language">
<h3 class="o_main_panel_skill_name" t-field="skill_line.skill_id">Python</h3>
<div class="progress o_main_panel_skill_progress_bar">
<div
class="o_main_panel_skill_progress_bar_color"
role="progressbar"
t-attf-style="width: #{skill_line.level_progress}%; background: #{color_primary};"
t-att-aria-valuenow="skill_line.level_progress"
aria-valuemin="0"
aria-label="Progress bar"
aria-valuemax="100"/>
</div>
</div>
</t>
</div>
</t>
</div>
</div>
<div class="oe_structure"></div>
</template>
</odoo>

View file

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="hr_employee_skill_log_view_graph_employee" model="ir.ui.view">
<field name="name">hr.employee.skill.log.view.graph</field>
<field name="model">hr.employee.skill.log</field>
<field name="arch" type="xml">
<graph string="Skills History" type="line" stacked="0" js_class="skills_graph">
<field name="date" interval="day" type="row"/>
<field name="skill_id" type="row"/>
<field name="level_progress" type="measure"/>
</graph>
</field>
</record>
<record id="hr_employee_skill_log_view_graph_department" model="ir.ui.view">
<field name="name">hr.employee.skill.log.view.graph</field>
<field name="model">hr.employee.skill.log</field>
<field name="arch" type="xml">
<graph string="Skills History" type="line" stacked="0" js_class="skills_graph">
<field name="date" interval="day" type="row"/>
<field name="skill_id" type="row"/>
<field name="level_progress" type="measure"/>
</graph>
</field>
</record>
<record id="hr_employee_skill_log_view_tree" model="ir.ui.view">
<field name="name">hr.employee.skill.log.view.tree</field>
<field name="model">hr.employee.skill.log</field>
<field name="arch" type="xml">
<tree string="Skills History">
<field name="employee_id"/>
<field name="department_id"/>
<field name="skill_type_id"/>
<field name="skill_id"/>
<field name="level_progress"/>
<field name="date"/>
</tree>
</field>
</record>
<record id="hr_employee_skill_log_view_search" model="ir.ui.view">
<field name="name">hr.employee.skill.log.view.search</field>
<field name="model">hr.employee.skill.log</field>
<field name="arch" type="xml">
<search string="Search Logs">
<field name="employee_id"/>
<field name="skill_id"/>
<field name="skill_type_id"/>
<field name="date"/>
<separator />
<group expand="0" string="Group By">
<filter string="Employee" name="group_by_employee_id" domain="[]" context="{'group_by': 'employee_id'}"/>
<filter string="Skill" name="group_by_skill_id" domain="[]" context="{'group_by': 'skill_id'}"/>
<filter string="Skill Type" name="group_by_skill_type_id" domain="[]" context="{'group_by': 'skill_type_id'}"/>
<filter string="Date" name="group_by_date" domain="[]" context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
<record id="action_hr_employee_skill_log_employee" model="ir.actions.act_window">
<field name="name">Skill History Report</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.employee.skill.log</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="hr_employee_skill_log_view_graph_employee"/>
<field name="context">{'fill_temporal': 0}</field>
<field name="target">current</field>
</record>
<record id="action_hr_employee_skill_log_department" model="ir.actions.act_window">
<field name="name">Skill History Report</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.employee.skill.log</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="hr_employee_skill_log_view_graph_department"/>
<field name="context">{'fill_temporal': 0, 'search_default_group_by_skill_type_id': 1, 'search_default_group_by_skill_id': 2}</field>
<field name="target">current</field>
</record>
</odoo>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="hr_job_skill_view_form" model="ir.ui.view">
<field name="name">hr.job.skill.view.form</field>
<field name="model">hr.job.skill</field>
<field name="arch" type="xml">
<form string="Skills" class="o_hr_skills_dialog_form">
<sheet>
<group>
<field name="job_id" invisible="1"/>
<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 &lt;= 1"
options="{'no_open': True, 'no_create': True}"
context="{'default_skill_type_id': skill_type_id}"
/>
</group>
</sheet>
</form>
</field>
</record>
</odoo>

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_hr_job_form" model="ir.ui.view">
<field name="name">hr.job.view.form.inherit.hr.skills</field>
<field name="model">hr.job</field>
<field name="inherit_id" ref="hr.view_hr_job_form"/>
<field name="arch" type="xml">
<page name="recruitment_page" position="attributes">
<attribute name="invisible">0</attribute>
</page>
<div class="oe_title" position="after">
<group id="job_skills">
<field
name="current_job_skill_ids"
widget="many2many_tags"
options="{'color_field': 'color'}"
readonly="True"
string="Expected Skills"
groups="!hr.group_hr_user"
/>
</group>
</div>
<div name="recruitment_target" position="after">
<field
name="current_job_skill_ids"
mode="list"
widget="many2one_tags_skills"
context="{'default_job_id': id}"
string="Expected Skills"
>
<list>
<field name="skill_id"/> <!--This is needed for the UI to update smoothly -->
<field name="skill_level_id"/> <!--This is needed for the UI to update smoothly -->
<field name="display_name"/>
<field name="color"/>
</list>
</field>
</div>
</field>
</record>
</odoo>

View file

@ -8,11 +8,14 @@
<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="['|', ('resume_line_ids.name', 'ilike', self), ('resume_line_ids.description', 'ilike', self)]"/>
<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>
<filter name="group_job" position="after">
<filter name="group_by_skill_ids" string="Skills" domain="[]" context="{'group_by': 'skill_ids'}"/>
</filter>
</field>
</record>
@ -21,9 +24,15 @@
<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='company_id']" position="after">
<xpath expr="//field[@name='job_id']" position="after">
<field name="employee_skill_ids"/>
<field name="resume_line_ids" string="Resume" filter_domain="['|', ('resume_line_ids.name', 'ilike', self), ('resume_line_ids.description', 'ilike', self)]"/>
<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>
@ -31,9 +40,11 @@
<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>
@ -41,61 +52,112 @@
</h1>
</div>
<group>
<group>
<field name="employee_id" invisible="1"/>
<field name="line_type_id"/>
<field name="display_type" required="1"/>
<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>
<field name="date_start" required="True"/>
<field name="date_end"/>
<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="description" placeholder="Description"/>
<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">
<xpath expr="//page[@name='public']" position="before">
<page name="skills_resume" string="Resume">
<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 tree view rendered by the 'resume_one2many' widget.
Adding fields in the tree arch below makes them accessible to the widget
-->
<field mode="tree" nolabel="1" name="resume_line_ids" widget="resume_one2many">
<tree>
<field name="line_type_id"/>
<field name="name"/>
<field name="description"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="display_type" invisible="1"/>
</tree>
</field>
</div>
<div class="o_hr_skills_editable o_hr_skills_group o_group_skills col-lg-5 d-flex flex-column">
<separator string="Skills" class="mb-4"/>
<field mode="tree" nolabel="1" name="employee_skill_ids" widget="skills_one2many">
<tree>
<field name="skill_type_id" invisible="1"/>
<field name="skill_id"/>
<field name="skill_level_id"/>
<field name="level_progress" widget="progressbar"/>
</tree>
</field>
</div>
</div>
<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 &lt; context_today().strftime('%Y-%m-%d')"
decoration-danger="valid_to and valid_to &lt;= (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d') and valid_to &gt; context_today().strftime('%Y-%m-%d')"
decoration-warning="valid_to and valid_to &lt;= (context_today() + relativedelta(months=3)).strftime('%Y-%m-%d') and valid_to &gt; (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 &lt; 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 &lt;= (context_today() + relativedelta(days=7)).strftime(\'%Y-%m-%d\') and valid_to &gt; context_today().strftime(\'%Y-%m-%d\')',
'warning': 'valid_to and valid_to &lt;= (context_today() + relativedelta(months=3)).strftime(\'%Y-%m-%d\') and valid_to &gt; (context_today() + relativedelta(days=7)).strftime(\'%Y-%m-%d\')'
}
}"/>
</list>
</field>
</page>
</xpath>
</page>
</field>
</record>
@ -105,96 +167,171 @@
<field name="model">hr.employee.public</field>
<field name="inherit_id" ref="hr.hr_employee_public_view_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='public']" position="before">
<page name="skills_resume" string="Resume">
<div class="row">
<div class="o_hr_skills_group o_group_resume col-lg-7 d-flex flex-column">
<!-- This field uses a custom tree view rendered by the 'resume_one2many' widget.
Adding fields in the tree arch below makes them accessible to the widget
-->
<field mode="tree" nolabel="1" name="resume_line_ids" widget="resume_one2many">
<tree>
<field name="line_type_id"/>
<field name="name"/>
<field name="description"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="display_type" invisible="1"/>
</tree>
</field>
</div>
<div class="o_hr_skills_group o_group_skills col-lg-5 d-flex flex-column">
<separator string="Skills"/>
<field mode="tree" nolabel="1" name="employee_skill_ids" widget="skills_one2many">
<tree>
<field name="skill_type_id" invisible="1"/>
<field name="skill_id"/>
<field name="skill_level_id"/>
<field name="level_progress" widget="progressbar"/>
</tree>
</field>
</div>
<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 &lt; context_today().strftime('%Y-%m-%d')"
decoration-danger="valid_to and valid_to &lt;= (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d') and valid_to &gt; context_today().strftime('%Y-%m-%d')"
decoration-warning="valid_to and valid_to &lt;= (context_today() + relativedelta(months=3)).strftime('%Y-%m-%d') and valid_to &gt; (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 &lt; 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 &lt;= (context_today() + relativedelta(days=7)).strftime(\'%Y-%m-%d\') and valid_to &gt; context_today().strftime(\'%Y-%m-%d\')',
'warning': 'valid_to and valid_to &lt;= (context_today() + relativedelta(months=3)).strftime(\'%Y-%m-%d\') and valid_to &gt; (context_today() + relativedelta(days=7)).strftime(\'%Y-%m-%d\')'
}
}"/>
</list>
</field>
</page>
</xpath>
</field>
</record>
<record id="res_users_view_form" model="ir.ui.view">
<field name="name">hr.user.preferences.form.inherit.hr.skills</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="hr.res_users_view_form_profile" />
<field name="arch" type="xml">
<xpath expr="//page[@name='public']" position="before">
<page name="skills_resume" string="Resume">
<div class="row">
<div class="o_hr_skills_group o_group_resume col-lg-7 d-flex">
<!-- This field uses a custom tree view rendered by the 'resume_one2many' widget.
Adding fields in the tree arch below makes them accessible to the widget
-->
<field mode="tree" nolabel="1" name="resume_line_ids" widget="resume_one2many" attrs="{'readonly': [('can_edit', '=', False)]}">
<tree>
<field name="line_type_id"/>
<field name="name"/>
<field name="description"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="display_type" invisible="1"/>
</tree>
</field>
</div>
<div class="o_hr_skills_group o_group_skills col-lg-5 d-flex flex-column">
<separator string="Skills"/>
<field mode="tree" nolabel="1" name="employee_skill_ids" widget="skills_one2many" attrs="{'readonly': [('can_edit', '=', False)]}">
<tree>
<field name="skill_type_id" invisible="1"/>
<field name="skill_id"/>
<field name="skill_level_id"/>
<field name="level_progress" widget="progressbar"/>
</tree>
</field>
</div>
</div>
</page>
</xpath>
</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.tree.view</field>
<field name="name">hr.resume.line.type.list.view</field>
<field name="model">hr.resume.line.type</field>
<field name="arch" type="xml">
<tree name="Resume Line Types" editable="bottom">
<list name="Resume Sections" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
</tree>
<field name="is_course" string="Course?"/>
</list>
</field>
</record>
<record id="hr_resume_type_action" model="ir.actions.act_window">
<field name="name">Resume Line Types</field>
<field name="name">Resume Sections</field>
<field name="res_model">hr.resume.line.type</field>
<field name="view_mode">tree,form</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
@ -206,7 +343,7 @@
<menuitem
id="hr_resume_line_type_menu"
name="Line Types"
name="Sections"
action="hr_resume_type_action"
parent="hr_skills.menu_human_resources_configuration_resume"
sequence="3"
@ -221,26 +358,26 @@
</record>
<record id="employee_skill_level_view_tree" model="ir.ui.view">
<field name="name">hr.skill.level.tree</field>
<field name="name">hr.skill.level.list</field>
<field name="model">hr.skill.level</field>
<field name="arch" type="xml">
<tree string="Skill Levels">
<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"/>
<field name="default_level"/>
<button string="Set Default" type="object" name="action_set_default" attrs="{'invisible': [('default_level', '=', True)]}"/>
</tree>
<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.tree</field>
<field name="name">hr.skill.list</field>
<field name="model">hr.skill</field>
<field name="arch" type="xml">
<tree string="Skill Levels">
<list string="Skill Levels">
<field name="name"/>
<field name="skill_type_id"/>
</tree>
</list>
</field>
</record>
@ -266,35 +403,45 @@
<form string="Skills" class="o_hr_skills_dialog_form">
<sheet>
<group>
<group>
<field name="employee_id" invisible="1"/>
<field name="skill_type_id" widget="radio" />
</group>
<group>
<field name="skill_id" options="{'no_open': True, 'no_create_edit': True}"
context="{'default_skill_type_id': skill_type_id}"
domain="[('skill_type_id', '=', skill_type_id)]"
attrs="{'invisible': [('skill_type_id', '=', False)]}"/>
<label for="skill_level_id"
attrs="{'invisible': ['|', ('skill_id', '=', False), ('skill_type_id', '=', False)]}"/>
<div class="o_row"
attrs="{'invisible': ['|', ('skill_id', '=', False), ('skill_type_id', '=', False)]}">
<span class="ps-0" style="flex:1">
<field name="skill_level_id"
attrs="{'readonly': [('skill_id', '=', False)]}"
context="{'from_skill_level_dropdown': True, 'default_skill_type_id': skill_type_id}" />
</span>
<span style="flex:1">
<field name="level_progress" widget="progressbar" class="o_hr_skills_progress" attrs="{'invisible': [('skill_level_id', '=', False)]}" />
</span>
</div>
</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 &lt;= 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 &lt;= 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>
@ -318,21 +465,39 @@
<field name="name" string="Skill"/>
<field name="skill_type_id" string="Skill Type"/>
<separator/>
<group expand="0" string="Group By...">
<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_tree" model="ir.ui.view">
<field name="name">hr.skill.type.tree</field>
<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">
<tree string="Skill Types">
<field name="name"/>
<field name="skill_ids" widget="many2many_tags"/>
</tree>
<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>
@ -343,19 +508,25 @@
<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}">
<tree editable="bottom">
<list editable="bottom">
<field name="sequence" widget="handle" />
<field name="name"/>
</tree>
</list>
</field>
<group string="Levels">
</group>
@ -365,6 +536,63 @@
</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 &lt; context_today().strftime('%Y-%m-%d')"
decoration-danger="valid_to and valid_to &lt;= (context_today() + relativedelta(days=7)).strftime('%Y-%m-%d') and valid_to &gt; context_today().strftime('%Y-%m-%d')"
decoration-warning="valid_to and valid_to &lt;= (context_today() + relativedelta(months=3)).strftime('%Y-%m-%d') and valid_to &gt; (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', '&gt;', '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"
@ -372,4 +600,31 @@
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>