yhu-odoo 32fc38ef58 [IMP] hr_appraisal: Improve employee archiving flow
PURPOSE
=======

When you close a payroll (employees), there are often a lot of document
linked. Archiving an employee should archive the contract, cancel future
leaves, archive the private address

Specification
=============

Add departure date (hr):
  - Add a Date field to both hr.departure.wizard and hr.employee. In
    the wizard, the field is required.
  - In toggle_active() method in hr.employee, set departure_date to
    false when unarchive the employee.
  - If user has a current running contract, a user error will raise if
    user enter a departure date earlier than the start date of the
    contract.
Add checkbox to set a closing date on hr.contract (hr.contract):
  - In the hr.departure.wizard, set the departure date to be the end
    date of runing contract. Set the states of all draft contracts to
    "cancel".
Add checkbox to free car (hr.fleet):
  - In the hr.departure.wizard, set end_date to
    fleet.vehicle.assignation.log, if there is no end_date or end_date >
    departure_date
  - Go through fleet.vehicle, find records with dirver_id to be the
    employee, set it to False.
Add checkbox to archive private address (hr):
   - when the private address not link to a internel user, set
     employee.address_home_id.active to Flase
   - unarchive it after the employee unarchived
Add checkbox to cancel future appraisals (hr.appraisal)
   - find all appraisals link to the employee and state in
     ['new', 'pending'], set their state to 'cancel'.
Add checkbox to cancel future leaves (hr.holidays):
   - only consider leaves are not in state ['refuse', 'cancel'],
     find leaves with to_date > departure_date, set their state to
     'cancel'.

PR #42526
Task 2153106

Related: odoo/enterprise#7471
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-29 10:05:12 +00:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%