forked from Mapan/odoo17e
205 lines
9.7 KiB
XML
205 lines
9.7 KiB
XML
<?xml version="1.0" ?>
|
|
<odoo>
|
|
<record id="hr_appraisal_goal_view_form" model="ir.ui.view">
|
|
<field name="name">hr.appraisal.goal.view.form</field>
|
|
<field name="model">hr.appraisal.goal</field>
|
|
<field name="arch" type="xml">
|
|
<form class="o_appraisal_goal_form">
|
|
<header>
|
|
<button name="action_confirm" type="object"
|
|
string="Mark as Done" class="oe_highlight"
|
|
invisible="progression == '100'"/>
|
|
</header>
|
|
<sheet>
|
|
<widget name="web_ribbon" title="Done" bg_color="text-bg-success" invisible="progression != '100'"/>
|
|
<div class="oe_title">
|
|
<label for="name" string="Goal"/>
|
|
<h1>
|
|
<field name="name" placeholder="e.g. Present yourself to your new team"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="is_manager" invisible="1"/>
|
|
<field name="employee_autocomplete_ids" invisible="1"/>
|
|
<field name="employee_id" domain="[['id', 'in', employee_autocomplete_ids]]"
|
|
readonly="not is_manager"
|
|
widget="many2one_avatar_employee"/>
|
|
<field name="progression" widget="selection_badge"/>
|
|
</group>
|
|
<group>
|
|
<field name="manager_id" force_save="1" readonly="not is_manager" widget="many2one_avatar_employee"/>
|
|
<field name="deadline"/>
|
|
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Description" name="description">
|
|
<field name="description"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids"/>
|
|
<field name="activity_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_appraisal_goal_view_tree" model="ir.ui.view">
|
|
<field name="name">hr.appraisal.goal.view.tree</field>
|
|
<field name="model">hr.appraisal.goal</field>
|
|
<field name="arch" type="xml">
|
|
<tree sample="1" class="o_goal_list">
|
|
<field name="name" class="fw-bold"/>
|
|
<field name="deadline" widget="remaining_days"/>
|
|
<field name="activity_ids" widget="list_activity"/>
|
|
<field name="progression" widget="badge" decoration-success="progression == '100'"/>
|
|
<field name="employee_id" widget="many2one_avatar_employee"/>
|
|
<field name="manager_id" widget="many2one_avatar_employee"/>
|
|
<field name="tag_ids" widget="many2many_tags" readonly="1" optional="hidden" options="{'color_field': 'color'}"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_appraisal_goal_view_kanban" model="ir.ui.view">
|
|
<field name="name">hr.appraisal.goal.view.kanban</field>
|
|
<field name="model">hr.appraisal.goal</field>
|
|
<field name="arch" type="xml">
|
|
<kanban quick_create="false" class="o_hr_employee_kanban" sample="1">
|
|
<field name="description"/>
|
|
<field name="progression"/>
|
|
<templates>
|
|
<t t-name="kanban-menu">
|
|
<t t-if="widget.deletable"><a type="delete" class="dropdown-item" role="menuitem">Delete</a></t>
|
|
<a type="object" name="action_confirm" class="dropdown-item" invisible="progression == '100'" role="menuitem">Mark as Done</a>
|
|
</t>
|
|
<t t-name="kanban-box">
|
|
<div class="oe_kanban_card oe_kanban_global_click oe_kanban_content">
|
|
<div class="ribbon ribbon-top-right" invisible="progression != '100'">
|
|
<span class="text-bg-success">Done</span>
|
|
</div>
|
|
<div class="o_kanban_record_top mb-0">
|
|
<div class="o_kanban_record_top_left">
|
|
<span><field name="name"/></span>
|
|
</div>
|
|
<t t-if="record.progression.raw_value != 100">
|
|
<div class="o_kanban_top_right me-2 fw-bold">
|
|
<t t-esc="record.progression.value"/>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
<div class="o_kanban_record_subtitle" >
|
|
<field name="employee_id"/>
|
|
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
|
</div>
|
|
<div class="o_kanban_record_bottom mt-auto d-flex justify-content-between align-items-end">
|
|
<div class="oe_kanban_bottom_left">
|
|
<field name="activity_ids" widget="kanban_activity"/>
|
|
<field name="deadline" widget="remaining_days"/>
|
|
</div>
|
|
<div class="oe_kanban_bottom_right">
|
|
<field name="employee_id" widget="many2one_avatar_employee"/>
|
|
</div>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_appraisal_goal_view_graph" model="ir.ui.view">
|
|
<field name="name">hr.appraisal.goal.view.kanban</field>
|
|
<field name="model">hr.appraisal.goal</field>
|
|
<field name="arch" type="xml">
|
|
<graph string="Goals" type="bar" stacked="0" order="asc" sample="1">
|
|
<field name="employee_id"/>
|
|
<field name="progression"/>
|
|
</graph>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_appraisal_goal_view_search" model="ir.ui.view">
|
|
<field name="name">hr.appraisal.goal.view.search</field>
|
|
<field name="model">hr.appraisal.goal</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="employee_id"/>
|
|
<field name="manager_id"/>
|
|
<field name="tag_ids"/>
|
|
<filter string="My Goals" name="filter_my_goals" domain="[('employee_id.user_id', '=', uid)]"/>
|
|
<filter string="People I Manage" name="people_i_manage" domain="[('employee_id.parent_id.user_id', '=', uid)]" groups="hr_appraisal.group_hr_appraisal_user"/>
|
|
<separator/>
|
|
<filter string="Late" name="filter_late" domain="[('deadline', '<', context_today().strftime('%Y-%m-%d'))]"/>
|
|
<filter string="Deadline" name="filter_deadline" date="deadline"/>
|
|
<filter string='Deadline' name="deadline_group" context="{'group_by': 'deadline'}"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_hr_appraisal_goal" model="ir.actions.act_window">
|
|
<field name="name">Goals</field>
|
|
<field name="res_model">hr.appraisal.goal</field>
|
|
<field name="view_mode">kanban,tree,form,graph</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create new goals
|
|
</p>
|
|
<p>
|
|
Assign Goals to motivate your Employees and keep track of their objectives between Appraisals.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_mark_as_done" model="ir.actions.server">
|
|
<field name="name">Mark as Done</field>
|
|
<field name="model_id" ref="hr_appraisal.model_hr_appraisal_goal"/>
|
|
<field name="binding_model_id" ref="hr_appraisal.model_hr_appraisal_goal"/>
|
|
<field name="binding_view_types">tree</field>
|
|
<field name="state">code</field>
|
|
<field name="code">records.action_confirm()</field>
|
|
</record>
|
|
|
|
<menuitem name="Goals"
|
|
parent="menu_hr_appraisal_root"
|
|
id="menu_hr_appraisal_goal"
|
|
action="action_hr_appraisal_goal"
|
|
sequence="2"/>
|
|
|
|
<!-- YTI Manage goal security -->
|
|
|
|
<record id="hr_appraisal_goal_tag_view_tree" model="ir.ui.view">
|
|
<field name="name">hr.appraisal.goal.tag.view.tree</field>
|
|
<field name="model">hr.appraisal.goal.tag</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Tags" editable="bottom">
|
|
<field name="name"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_appraisal_goal_tag_action" model="ir.actions.act_window">
|
|
<field name="name">Goal Tags</field>
|
|
<field name="res_model">hr.appraisal.goal.tag</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Add a new tag
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem
|
|
id="menu_config_goal_tags"
|
|
name="Tags"
|
|
groups="base.group_no_one"
|
|
action="hr_appraisal_goal_tag_action"
|
|
parent="hr_appraisal.menu_hr_appraisal_configuration"
|
|
sequence="25"/>
|
|
|
|
</odoo>
|