395 lines
28 KiB
XML
395 lines
28 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<!--Tree view for the 'hr.resignation' model.-->
|
|
<record id="hr_resignation_view_tree" model="ir.ui.view">
|
|
<field name="name">hr.resignation.view.tree</field>
|
|
<field name="model">hr.resignation</field>
|
|
<field name="priority" eval="8"/>
|
|
<field name="arch" type="xml">
|
|
<list string="Employee Resignation">
|
|
<field name="employee_id"/>
|
|
<field name="department_id"/>
|
|
<field name="employee_contract"/>
|
|
<field name="joined_date" readonly="1"/>
|
|
<field name="emp_requested_lwd"/>
|
|
<field name="approved_revealing_date"/>
|
|
<field name="resignation_type"/>
|
|
<field name="notice_period"/>
|
|
<field name="state"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
<!--Form view for the 'hr.resignation' model.-->
|
|
<record id="hr_resignation_view_form" model="ir.ui.view">
|
|
<field name="name">hr.resignation.view.form</field>
|
|
<field name="model">hr.resignation</field>
|
|
<field name="priority" eval="8"/>
|
|
<field name="arch" type="xml">
|
|
<form string="Employee Resignation">
|
|
<header>
|
|
<button string="Confirm" type="object"
|
|
name="action_confirm_resignation"
|
|
invisible="state != 'draft'"
|
|
class="oe_highlight"/>
|
|
<button string="Cancel" type="object"
|
|
name="action_cancel_resignation"
|
|
invisible="state != 'draft'"/>
|
|
<!-- <button string="Approve" type="object"-->
|
|
<!-- groups="hr.group_hr_user"-->
|
|
<!-- name="action_approve_resignation"-->
|
|
<!-- invisible="state != 'confirm'"/>-->
|
|
<!-- <button string="Reject" type="object"-->
|
|
<!-- groups="hr.group_hr_user"-->
|
|
<!-- name="action_reject_resignation"-->
|
|
<!-- invisible="state != 'confirm'"/>-->
|
|
<button string="Set to Draft" type="object"
|
|
groups="hr.group_hr_manager"
|
|
name="action_reset_to_draft"
|
|
invisible="state not in ['approved']"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="draft" invisible="state != 'draft'"/>
|
|
<field name="normal_resignation_status" widget="statusbar" invisible="state in ['draft'] or resignation_type != 'resigned'" readonly="state not in ['in_process']" statusbar_visible="sent_to_manager,submit_hr,process_relieving_documents,final_clearance"/>
|
|
<button string="Schedule Meeting" type="object"
|
|
name="action_schedule_Meeting" class="oe_highlight"
|
|
invisible="normal_resignation_status != 'sent_to_manager' or not is_manager or state not in ['in_process'] or resignation_type != 'resigned'"/>
|
|
<button string="Proceed Further To HR" type="object"
|
|
name="action_proceed_further" class="oe_highlight"
|
|
invisible="normal_resignation_status != 'meeting_with_emp' or not is_manager or state not in ['in_process'] or resignation_type != 'resigned'"/>
|
|
<button string="Withdraw" type="object"
|
|
name="action_withdraw_resignation" class="oe_highlight"
|
|
invisible="state != 'in_process' or resignation_type != 'resigned' or not is_emp or not show_withdraw or state not in ['in_process']"/>
|
|
<button string="Process Resignation" type="object"
|
|
name="action_process_resignation" class="oe_highlight"
|
|
invisible="normal_resignation_status != 'submit_hr' or not is_hr or state not in ['in_process'] or resignation_type != 'resigned'"/>
|
|
|
|
<button string="Process Relieving Documents" type="object"
|
|
name="action_process_relieving_docs" class="oe_highlight"
|
|
invisible="normal_resignation_status != 'hr_approve_and_request_asset_collection' or not is_hr or not manager_checklist_submitted or not it_checklist_submitted or not finance_checklist_submitted or not admin_checklist_submitted or state not in ['in_process'] or resignation_type != 'resigned'"/>
|
|
|
|
|
|
<button string="Final Clearance" type="object"
|
|
name="process_final_clearance" class="oe_highlight"
|
|
invisible="normal_resignation_status not in ['process_relieving_documents'] or not hr_checklist_submitted or not is_hr or state not in ['in_process'] or resignation_type != 'resigned'"
|
|
confirm="Are you sure you want to proceed? All employee-related data, including User and Partner records, will be permanently archived."/>
|
|
|
|
|
|
<field name="fired_status" widget="statusbar" invisible="state in ['draft'] or resignation_type != 'fired'" statusbar_visible="warning_sent,hr_approve_and_request_asset_collection,process_relieving_documents,final_clearance"/>
|
|
<button string="Schedule Meeting" type="object"
|
|
name="action_schedule_Meeting" class="oe_highlight"
|
|
invisible="fired_status != 'warning_sent' or not is_hr or state not in ['in_process'] or resignation_type != 'fired'"/>
|
|
<button string="Proceed Further" type="object"
|
|
name="action_proceed_further_fired" class="oe_highlight"
|
|
invisible="fired_status != 'meeting_with_emp' or not is_hr or state not in ['in_process'] or resignation_type != 'fired'"/>
|
|
<button string="Withdraw" type="object"
|
|
name="action_withdraw_resignation" class="oe_highlight"
|
|
invisible="state != 'in_process' or resignation_type != 'fired' or not is_hr or not show_withdraw"/>
|
|
<button string="Process Relieving Documents" type="object"
|
|
name="action_process_relieving_docs" class="oe_highlight"
|
|
invisible="fired_status != 'hr_approve_and_request_asset_collection' or not is_hr or not manager_checklist_submitted or not it_checklist_submitted or not finance_checklist_submitted or not admin_checklist_submitted or state not in ['in_process'] or resignation_type != 'fired'"/>
|
|
|
|
<button string="Final Clearance" type="object"
|
|
name="process_final_clearance" class="oe_highlight"
|
|
invisible="fired_status not in ['process_relieving_documents'] or not hr_checklist_submitted or not is_hr or state not in ['in_process'] or resignation_type != 'fired'"
|
|
confirm="Are you sure you want to proceed? All employee-related data, including User and Partner records, will be permanently archived."/>
|
|
|
|
|
|
<field name="absconded_status" widget="statusbar" invisible="state in ['draft'] or resignation_type != 'abosconded'" statusbar_visible="contact_emp,send_hr,hr_discussion,final_clearance"/>
|
|
<button string="Responded" type="object"
|
|
name="action_abscond_emp_response" class="oe_highlight"
|
|
invisible="state != 'in_process' or not is_manager or absconded_status not in ['contact_emp'] or resignation_type != 'abosconded'"/>
|
|
<button string="Schedule Meeting" type="object"
|
|
name="action_abscond_meeting_emp" class="oe_highlight"
|
|
invisible="state != 'in_process' or not is_manager or absconded_status not in ['responed'] or resignation_type != 'abosconded'"/>
|
|
|
|
<button string="Submit to HR" type="object"
|
|
name="action_abscond_send_hr" class="oe_highlight"
|
|
invisible="state != 'in_process' or not is_manager or absconded_status not in ['meeting_with_emp'] or resignation_type != 'abosconded'"/>
|
|
|
|
<button string="Withdraw" type="object"
|
|
name="action_withdraw_resignation" class="oe_highlight"
|
|
invisible="state != 'in_process' or resignation_type != 'abosconded' or not is_hr or not show_withdraw or absconded_status not in ['send_hr'] "/>
|
|
<button string="Process Resignation" type="object"
|
|
name="action_process_resignation" class="oe_highlight"
|
|
invisible="absconded_status not in ['send_hr'] or not is_hr or state not in ['in_process'] or resignation_type != 'abosconded'"/>
|
|
|
|
<button string="Process Relieving Documents" type="object"
|
|
name="action_process_relieving_docs" class="oe_highlight"
|
|
invisible="absconded_status != 'hr_approve_and_request_asset_collection' or not is_hr or not manager_checklist_submitted or not it_checklist_submitted or not finance_checklist_submitted or not admin_checklist_submitted or state not in ['in_process'] or resignation_type != 'abosconded'"/>
|
|
|
|
<button string="No Response" type="object"
|
|
name="action_abscond_emp_no_response"
|
|
invisible="state != 'in_process' or not is_manager or absconded_status not in ['contact_emp'] or resignation_type != 'abosconded'"/>
|
|
|
|
<button string="Final Clearance" type="object"
|
|
name="process_final_clearance" class="oe_highlight"
|
|
invisible="absconded_status not in ['process_relieving_documents'] or not hr_checklist_submitted or not is_hr or state not in ['in_process'] or resignation_type != 'abosconded'"
|
|
confirm="Are you sure you want to proceed? All employee-related data, including User and Partner records, will be permanently archived."/>
|
|
|
|
</header>
|
|
<sheet>
|
|
<widget name="web_ribbon" title="In Progress" bg_color="text-bg-info"
|
|
invisible="state != 'in_process'"/>
|
|
<widget name="web_ribbon" title="Withdraw" bg_color="text-bg-success"
|
|
invisible="state != 'withdraw'"/>
|
|
<widget name="web_ribbon" title="Refuse/Cancel" bg_color="text-bg-danger"
|
|
invisible="state != 'cancel_refuse'"/>
|
|
<div class="oe_title">
|
|
<h1>
|
|
<field name="name" readonly="1"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<field name="is_manager" invisible="1" force_save="1"/>
|
|
<field name="is_finance_manager" invisible="1" force_save="1"/>
|
|
<field name="is_admin" invisible="1" force_save="1"/>
|
|
<field name="is_hr" invisible="1" force_save="1"/>
|
|
<field name="is_it_manager" invisible="1" force_save="1"/>
|
|
<field name="is_emp" invisible="1" force_save="1"/>
|
|
<group string="Employee Details">
|
|
<field name="change_employee" invisible="1"/>
|
|
<field name="employee_id"
|
|
readonly="change_employee == False or state != 'draft'"/>
|
|
<field name="department_id"/>
|
|
<field name="employee_contract" invisible="state == 'draft'"/>
|
|
<field name="emp_responded" readonly="1" force_save="1" invisible="resignation_type != 'abosconded'"/>
|
|
<field name="show_withdraw" invisible="not is_hr"/>
|
|
|
|
</group>
|
|
<group string="Dates">
|
|
<field name="joined_date"/>
|
|
<field name="resign_confirm_date"
|
|
readonly="1"
|
|
invisible="resign_confirm_date == False"/>
|
|
<field name="emp_requested_lwd"
|
|
readonly="state != 'draft'" invisible="resignation_type != 'resigned'"/>
|
|
<field name="agree_with_emp_lwd" readonly="normal_resignation_status == 'draft' or not is_hr" invisible="resignation_type != 'resigned'"/>
|
|
<field name="approved_revealing_date" readonly="state == 'draft' or not is_hr"/>
|
|
<field name="notice_period" readonly="state == 'draft' or not is_hr" invisible="resignation_type != 'resigned'"/>
|
|
</group>
|
|
<group string="Resignation Details">
|
|
<field name="resignation_type" string="Type"
|
|
groups="hr.group_hr_user"
|
|
readonly="state != 'draft' or is_emp"/>
|
|
<field name="reason"
|
|
readonly="state != 'draft'"/>
|
|
</group>
|
|
<group string="Checklist Submission Status">
|
|
<field name="manager_checklist_submitted" string="Manager" readonly="1" force_save="1"/>
|
|
<field name="it_checklist_submitted" string="IT Manager" readonly="1" force_save="1"/>
|
|
<field name="finance_checklist_submitted" string="Finance" readonly="1" force_save="1"/>
|
|
<field name="admin_checklist_submitted" string="Admin" readonly="1" force_save="1"/>
|
|
<field name="hr_checklist_submitted" string="HR" readonly="1" force_save="1" invisible="not is_hr or normal_resignation_status not in ['process_relieving_documents','final_clearance']"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Comments">
|
|
<group>
|
|
<field name="emp_comments" readonly="not is_emp" string="Employee"/>
|
|
<field name="manager_comments" readonly="not is_manager" string="Manager"/>
|
|
<field name="finance_manager_comments" readonly="not is_finance_manager" string="Finance Manager"/>
|
|
<field name="it_manager_comments" readonly="not is_it_manager" string="IT Manager"/>
|
|
<field name="admin_comments" readonly="not is_admin" string="Admin"/>
|
|
<field name="hr_comments" readonly="not is_hr" string="HR"/>
|
|
</group>
|
|
</page>
|
|
<page string="Discussion MOM" invisible="state in ['draft'] or not is_manager and not is_emp and not is_hr">
|
|
<field name="emp_meeting_points" readonly="not meeting_sheduled"/>
|
|
</page>
|
|
<page string="Checklists" invisible="state in ['draft']">
|
|
<notebook>
|
|
<page string="Manager Checklist">
|
|
|
|
<div>
|
|
<button string="Submit Checklist" type="object"
|
|
name="action_submit_manager_checklist"
|
|
class="btn-primary"
|
|
invisible="manager_checklist_submitted or not is_manager"/>
|
|
|
|
<button string="Revert Checklist" type="object"
|
|
name="action_revert_manager_checklist"
|
|
class="btn-primary"
|
|
invisible="not manager_checklist_submitted or not is_hr"/>
|
|
</div>
|
|
<br/>
|
|
<div>
|
|
|
|
<field name="manager_checklist_ids" nolabel="1"
|
|
readonly="manager_checklist_submitted or not is_manager">
|
|
<list editable="top" create="0">
|
|
<field name="checklist_name" readonly="1"/>
|
|
<field name="is_done" widget="boolean_toggle" string="Done?"
|
|
readonly="parent.manager_checklist_submitted or not parent.is_manager"/>
|
|
<field name="remarks" string="Remarks (if any)"
|
|
readonly="parent.manager_checklist_submitted or not parent.is_manager"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
</page>
|
|
|
|
<page string="IT Checklist">
|
|
<div>
|
|
<button string="Submit Checklist" type="object"
|
|
name="action_submit_it_checklist"
|
|
class="btn-primary"
|
|
invisible="it_checklist_submitted or not is_it_manager"/>
|
|
|
|
<button string="Revert Checklist" type="object"
|
|
name="action_revert_it_checklist"
|
|
class="btn-primary"
|
|
invisible="not it_checklist_submitted or not is_hr"/>
|
|
</div>
|
|
<br/>
|
|
<div>
|
|
<field name="it_checklist_ids" nolabel="1"
|
|
readonly="it_checklist_submitted or not is_it_manager">
|
|
<list editable="top" create="0">
|
|
<field name="checklist_name" readonly="1"/>
|
|
<field name="is_done" widget="boolean_toggle" string="Done?"
|
|
readonly="parent.it_checklist_submitted or not parent.is_it_manager"/>
|
|
<field name="remarks" string="Remarks (if any)"
|
|
readonly="parent.it_checklist_submitted or not parent.is_it_manager"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
</page>
|
|
|
|
<page string="Admin Checklist">
|
|
<div>
|
|
<button string="Submit Checklist" type="object"
|
|
name="action_submit_admin_checklist"
|
|
class="btn-primary"
|
|
invisible="admin_checklist_submitted or not is_admin"/>
|
|
|
|
<button string="Revert Checklist" type="object"
|
|
name="action_revert_admin_checklist"
|
|
class="btn-primary"
|
|
invisible="not admin_checklist_submitted or not is_hr"/>
|
|
</div>
|
|
<br/>
|
|
<div>
|
|
<field name="admin_checklist_ids" nolabel="1"
|
|
readonly="admin_checklist_submitted or not is_admin">
|
|
<list editable="top" create="0">
|
|
<field name="checklist_name" readonly="1"/>
|
|
<field name="is_done" widget="boolean_toggle" string="Done?"
|
|
readonly="parent.admin_checklist_submitted or not parent.is_admin"/>
|
|
<field name="remarks" string="Remarks (if any)"
|
|
readonly="parent.admin_checklist_submitted or not parent.is_admin"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
</page>
|
|
|
|
<page string="Finance Checklist">
|
|
<div>
|
|
<button string="Submit Checklist" type="object"
|
|
name="action_submit_finance_checklist"
|
|
class="btn-primary"
|
|
invisible="finance_checklist_submitted or not is_finance_manager"/>
|
|
|
|
<button string="Revert Checklist" type="object"
|
|
name="action_revert_finance_checklist"
|
|
class="btn-primary"
|
|
invisible="not finance_checklist_submitted or not is_hr"/>
|
|
</div>
|
|
<br/>
|
|
<div>
|
|
<field name="finance_checklist_ids" nolabel="1"
|
|
readonly="finance_checklist_submitted or not is_finance_manager">
|
|
<list editable="top" create="0">
|
|
<field name="checklist_name" readonly="1"/>
|
|
<field name="is_done" widget="boolean_toggle" string="Done?"
|
|
readonly="parent.finance_checklist_submitted or not parent.is_finance_manager"/>
|
|
<field name="remarks" string="Remarks (if any)"
|
|
readonly="parent.finance_checklist_submitted or not parent.is_finance_manager"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
</page>
|
|
<page string="HR Checklist" invisible="normal_resignation_status not in ['process_relieving_documents','final_clearance'] and absconded_status not in ['process_relieving_documents','final_clearance'] and fired_status not in ['process_relieving_documents','final_clearance']">
|
|
<div>
|
|
<button string="Submit Checklist" type="object"
|
|
name="action_submit_hr_checklist"
|
|
class="btn-primary"
|
|
invisible="hr_checklist_submitted or not is_hr"/>
|
|
|
|
<button string="Revert Checklist" type="object"
|
|
name="action_revert_hr_checklist"
|
|
class="btn-primary"
|
|
invisible="not hr_checklist_submitted or not is_hr"/>
|
|
</div>
|
|
<br/>
|
|
<div>
|
|
<field name="hr_checklist_ids" nolabel="1"
|
|
readonly="hr_checklist_submitted or not is_hr">
|
|
<list editable="top" create="0">
|
|
<field name="checklist_name" readonly="1"/>
|
|
<field name="is_done" widget="boolean_toggle" string="Done?"
|
|
readonly="parent.hr_checklist_submitted or not parent.is_hr"/>
|
|
<field name="remarks" string="Remarks (if any)"
|
|
readonly="parent.hr_checklist_submitted or not parent.is_hr"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
<!-- <field name="hr_checklist_ids">-->
|
|
<!-- <list editable="top" create="0">-->
|
|
<!-- <field name="checklist_name" readonly="1"/>-->
|
|
<!-- <field name="is_done" widget="boolean_toggle" string="Done?"/>-->
|
|
<!-- <field name="remarks"/>-->
|
|
<!-- </list>-->
|
|
<!-- </field>-->
|
|
</page>
|
|
</notebook>
|
|
</page>
|
|
<page string="Relieving Documents" invisible="not is_hr or normal_resignation_status not in ['process_relieving_documents','final_clearance'] and absconded_status not in ['process_relieving_documents','final_clearance'] and fired_status not in ['process_relieving_documents','final_clearance'] ">
|
|
<field name="relieving_documents" style="padding-bottom:150px; padding-top:50px; width: 100%;" widget="many2many_binary" options="{'preview_images': true}" readonly="normal_resignation_status in ['final_clearance'] or absconded_status in ['final_clearance'] or fired_status in ['final_clearance']"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<!--Action for the 'hr.resignation' model.-->
|
|
<record id="hr_resignation_action" model="ir.actions.act_window">
|
|
<field name="name">Employee Resignation</field>
|
|
<field name="res_model">hr.resignation</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="domain">[('state', 'in', ('draft','in_process',
|
|
'cancel_refuse','cancel_refuse','withdrawl'))]
|
|
</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">Create the First Resignation
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<!--Action for the 'hr.resignation' model, specifically for viewing approved resignations.-->
|
|
<record id="hr_resignation_approved_action" model="ir.actions.act_window">
|
|
<field name="name">Approved Resignation</field>
|
|
<field name="res_model">hr.resignation</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="domain">[('state', '=', 'approved')]</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">Approved Resignation
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<!-- Root menu item for Resignation -->
|
|
<menuitem id="hr_resignation_menu_root" name="Resignation"
|
|
groups="base.group_user"
|
|
web_icon="hr_resignation,static/description/icon.png"
|
|
sequence="21"/>
|
|
<!-- Menu item for Resignation Request -->
|
|
<menuitem id="hr_resignation_menu_request"
|
|
parent="hr_resignation_menu_root" name="Resignation Request"
|
|
action="hr_resignation_action" groups="base.group_user"
|
|
sequence="4"/>
|
|
<!-- Menu item for Approved Resignation -->
|
|
<menuitem id="hr_resignation_menu_approved_request"
|
|
parent="hr_resignation_menu_root"
|
|
name="Approved Resignation"
|
|
action="hr_resignation_approved_action"
|
|
groups="hr.group_hr_user"
|
|
sequence="4"/>
|
|
</odoo>
|