summaryrefslogtreecommitdiff
path: root/addons/hr/wizard
AgeCommit message (Collapse)Author
2020-07-23[IMP] *: replace default_get overrides by default attribute on fields.Victor Feyens
Leave the generic management of fields default to the orm as much as possible. * Default method is not called unless necessary. * Default values are correctly post-processed by the orm when necessary.
2020-07-16[FIX] hr: activity type configuration on hr plansJorge Pinna Puissant
revert of 0f4ec36 and bf8a9af - Employees > Configuration > Planning Types and ensure the activity type "To Do" is set to scheduled date several days after previous activity (default should be 5 days); - Check that onboarding Plan has at least 2 activities with activity type "To Do"; - Click launch plan. The activity type configuration is ignored and all activities are due tomorrow. The previous commit uses the function _onchange_activity_type_id to fix this issue. The problem with this commit, is that the _onchange_activity_type_id function will also change the responsible, the notes and the summary to set them to their default value. Now, the activities are due taking into account the activity type configuration without modifying the already set responsible, notes and summary. opw-2265631 X-original-commit: 81e4745a31567af7b58064bd8b4e9bae0756354f
2020-07-03[FIX] hr: activity type responsible on hr plansJorge Pinna Puissant
fine-tuning of bf8a9af1ac549be830bec28c88eb1c565b591941 - Employees > Configuration > Activity Planning > Plans and ensure the activities have different responsible; - Create a new Employee, assign a Manager (a different user then the one connected, you can assign Marc Demo for example); - Click launch plan. Before this commit, the activity type responsible is ignored and the responsible for all activities is the connected user. Now, the responsible for the activities are assigned taking into account the activity type configuration. opw-2265631 closes odoo/odoo#54054 X-original-commit: 0f4ec369dccdf25aed259ae97b5cc8973a1a8c5a Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-05-18[FIX] hr: activity type configuration on hr plansJorge Pinna Puissant
- Employees > Configuration > Planning Types and ensure the activity type "To Do" is set to scheduled date several days after previous activity (default should be 5 days); - Check that onboarding Plan has at least 2 activities with activity type "To Do"; - Click launch plan. Before this commit, the activity type configuration is ignored and all activities are due tomorrow. Now, the activities are due taking into account the activity type configuration. opw-2255586 closes odoo/odoo#51423 X-original-commit: c159479d7f714f2ec871cc4b965de3f961160789 Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-01-29[IMP] hr_appraisal: Improve employee archiving flowyhu-odoo
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>
2019-11-25[IMP] mail: better prevent activity type removal and add a fallback mechanismVictor Feyens
Current activity types master data cannot be unlinked through a quite harsh override of unlink using xml id existence, introduced at 2602642a78dff6c15d615fadf4c55a6b6ca315df. Some of them are real master data, other could be unlinked if users want it. Finally custom activity types may cause errors when removed if used in some side models like server actions or automated actions. To allow more flexibility we remove the removal constraint and implement a fallback mechanism. It is implemented in mail.activity.mixin when calling activity_schedule(xmlid, ...). If the given xmlid is not found _default_activity_type() specifies the default activity to use. It can be overridden in modules if some specific behavior is wanted. e.g. def _default_activity_type(self): """Define a default fallback activity type when xml id not found only used in in activity_schedule() for now. """ try: return self.env.ref('mail.mail_activity_data_todo') except Exception: return False In this commit we also * restrict deletion of activity type (hr.plan and ir.actions.server); * fallback on default activity type if xmlid ref not found in activity_schedule; * correct calls to activity_schedule and replace some manual creation calls by activity_schedule; Task ID 1961156 PR #39013 Related: odoo/enterprise#6238 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Co-authored-by: Victor Feyens <vfe@odoo.com> Co-authored-by: Michaël Mattiello <mcm@odoo.com>
2019-09-17[FIX] hr: stop planning acitivity if user has no accessRomainLibert
Since the introduction of the public/private employee model, having an acitivity defined on hr.employee (the private one) for an employee that has no rights to read it is useless. Task id 2072987 closes odoo/odoo#37021 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-12[IMP] hr: add note field on hr_plan_activity_typeRomainLibert
We would like to have a custom note on plan activities closes odoo/odoo#36796 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-17[REM] *: calls to @api.multiAdrian Torres
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-12[FIX] hr: Fix departure wizard activity generationYannick Tivisse
Purpose ======= If the fired employee has no access to the hr.employee model, the departure wizard will lead to a traceback, as we try to create an activity on a model for which the user won't be able to resolve it. Create an activity on the related partner instead.
2019-06-17[IMP] *: remove 'view_type' on window actions.Hiral Bhavsar
The old tree views don't really exist anymore, this odd pseudo-flag to dispatch between "list" and "tree" tree views has no reason to remain. Task 1937686 closes odoo/odoo#31243 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-23[REF] hr: allow to customize activity types in planThibault Delavallée
Purpose of this merge is to avoid having to define custom activity types for each step of HR onboarding plan. This is done by adding a summary field on hr activities, allowing to use default Todo activity type and customize directly the summary itself. Using custom activity types is still possible. Here we allow to avoid noise and having too much activity types defined as most of those activities can be simulated using the default Todo. People can still define and use their own activity types if necessary and required in their daily workflow. Commit linked to task ID 1923387 and PR #30235.
2019-04-23[MOV] hr: move files according to guidelinesThibault Delavallée
Recent merge d5fd84b89a51ef41ca0aa13cf7acc94e684d40ce added onboarding plans to employees with some new models. However conventions for naming files and views are not done. This commit fixes that to ensure code readability. Commit linked to task ID 1923387 and PR #30235.
2018-12-18[IMP] hr: add onboarding/offboarding activity planningsRomainLibert
Purpose ======= Give the possibility to elaborate plans through Odoo. For instance, in HR, you could create an onboarding plan when a employee is created. Someone manages laptop and other equipment, someone check hr stuff, ... This feature is generic but in a first time we will apply it only on the hr module. Ease HR process in a company by creating plans: a plan is an assembly of Next Activities that will be launched together whenever you need it. Example of plan for an employee onboarding: Activity: Prepare materials Responsible: Alain Deadline: At the contract signature Activity: Manage Cars Responsible: Cécile Deadline: at the contract signature (both signature) Activity: Plan Training Responsible: Caroline Deadline: After signature Activity: Training Responsible: Employee Deadline: 1 week after the employement date Specifications ============== On HR Configuration: Add a menu "Activity Plans" Activity plan object: - Name - Model (debug mode) (hr by default) - Activity Template o2m - Activity Type (only the one related to hr) - Deadline (come from Activity Type) - Responsible \/ 0 Coach 0 Manager 0 Other [Responsible_name] \/ (coach, manager or manually set if other) Add datas, 2 plans: Onboarding - Name: Onboarding - Plan lines: Activity: Setup IT Materials Responsible: [a user] (manager) Deadline: At the contract signature Activity: Plan Training Responsible: [manager] Deadline: After signature Activity: Training Responsible: [Employee] Deadline: 1 week after the employement date Offboarding - Name: Onboarding - Plan lines: Activity: Compute Out Delais Responsible: [a user] (manager) Deadline: today Activity: Take Back HR Materials Responsible: [manager] Deadline: today Activity: Manage Car Responsible: [manager] Deadline: today When to trigger it ? HR specific use case: 1/ On employee, from the employee chatter: when you create an employee, Odoobot will log a note with the following message: "Congratulations ! May i recommand you to setup an onboarding plan?", with a link create a plan from it. 2/ Add a button 'launch plan' to open a wizard to select the plan 3/ When archive an employee Open a wizard with: - Reason (selection) - Action plan (m2o not required) Error if employee not linked to a user. Task : 1912681 closes odoo/odoo#29151
2009-02-02Moved the attendance reports and wizard from the "hr" module to "hr_attendence".Lionel Sausin
Pulled back the weekly attendance report from the 4.2 branch Removed theorical workhours and holiday workhours from the reports to make sure they can be printed even if only "hr" and "hr_attendance" are installed bzr revid: ls@numerigraphe.fr-20090202182543-km4x5yp27d74ksk8
2009-01-04[IMP] Update the copyright to 2009Stephane Wirtel
bzr revid: stephane@tinyerp.com-20090104221250-55q32ayj2t8kzb2k
2008-12-10[IMP] Remove the print statementsStephane Wirtel
bzr revid: stephane@tinyerp.com-20081210223019-mzeqrvb35kwp0s3l
2008-11-17Incorrect spelling of 'separator'Stephane Wirtel
lp bug: https://launchpad.net/bugs/296851 fixed bzr revid: stephane@tinyerp.com-20081117092709-q0ivfsj35y34ctyb
2008-11-03passing modules in GPL-3Christophe Simonis
bzr revid: christophe@tinyerp.com-20081103191856-jhcivvwb16fvz2os
2008-09-18merge pso branchHarshad Modi
bzr revid: hmo@tinyerp.com-20080918154210-24ewi2d25azyom9i
2008-09-16modified filesPriyesh
bzr revid: solanki.priyesh@gmail.com-20080916142547-sejpe7rcv3wg19gi
2008-07-23add encoding comment and vim commentChristophe Simonis
bzr revid: christophe@tinyerp.com-20080723144147-77o5t9adx26a84lt
2008-07-22replace tabs with 4 spacesChristophe Simonis
bzr revid: christophe@tinyerp.com-20080722151128-f5zy75tsn8pgtndd
2008-07-08* translation of nearly all exceptionsChristophe Simonis
* the export of translations per module take only the files of these modules bzr revid: chs@tinyerp.com-77721e34d87043c4008239f004c7c616f6d4dc82
2008-06-16add Copyright and GPL license into the Header of Python filesstw
bzr revid: stw-d9a6d631f7cfdab5a120a6b0104ce2dbf8644841
2007-02-09HR: Sign-in Sign-out : bugfix , the user is now not allowed to provide a ↵bch
date in the future bzr revid: bch-74e27a5bdf39ba56eb5c96aa5deed7b267df59ac
2006-12-07New trunkpinky
bzr revid: pinky-dedd7f8a42bd4557112a0513082691b8590ad6cc