Commit Graph
8 Commits
Author SHA1 Message Date
Pierre-Yves Dufays 7053e37df1 [IMP] hr(_contract/_fleet): convert hr.plan to mail.activity.plan
We convert the custom plan implementation to use the generic one. As the
generic one can define plans for multiple model. We use the check
dedicated_to_res_model == 'hr.employee' to activate the specific feature for
hr.employee. Indeed, that field contains the model name when the plan is
applicable only for one model.

We also remove the 'launch plan' button as we can now launch a plan directly
from the activities button in the chatter.

Technical notes:
For the activity schedule wizard, we add the support for active_ids and
active_model as default values for res_ids and res_model because it is used as
link in the chatter to launch the wizard and we want to avoid a big migration
by keeping the link identical (and there are probably no simple solution to
keep the same behavior).

HR CONTRACT

Before the first contract date of the first selected element was chosen to
determine the planned due date if all first contract date were different
otherwise the minimum was chosen. So if the selection included 2 different date
among 3, the minimum was chosen but the first if the 3 were different.
With this change, the minimum is always used to determine the default planned
due date.

Task-3390865

Part-of: odoo/odoo#137969
2023-10-12 16:12:09 +00:00
Yannick Tivisse e8c48f824e [IMP] hr: Remove address_home_id field
Improve usability of employee form. It is confusing for end users
to create another record to encode the employee address.

Move all the private information on the hr.employee record itself.

Remove the M2O address_home_id.

TaskID: 3101400
2023-07-05 14:21:28 +02:00
dasz 6f07c8c2d8 [IMP] hr: remove record from demo data
task 3366281

closes odoo/odoo#124964

Related: odoo/upgrade#4773
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-29 09:10:46 +02:00
Rohitkumar (roku) 99b09bcd42 [IMP] hr_fleet: improve the employer On/Offboarding plan activities
PURPOSE:
Companies want to have a better integration, we need to focus on the On/Offboarding process,
 to find automation and something to show to our customers.

In this commit, we add the "Fleet Manager" in the responsible list of the activities
generated from a plan.

Case 1:
 If employee is not linked with fleet, `Employee XXX is not linked to a vehicle`
 this  warning will be appeared.

Case 2:
 If employee linked with  fleet  but doesn't  fleet manager set  on fleet,
`Employee's vehicle XXX is not linked to a fleet manager.` this warning will be appeared.

task-3081261

closes odoo/odoo#108892

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-07 18:02:31 +01:00
Kevin Baptiste bbeec32ed8 [IMP] hr_fleet: remove partners from demo data
The demo data were assigning random res.partner as home_address_id for
some employees, this is no longer required since #98027.

closes odoo/odoo#107767

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-12 18:16:17 +01:00
Leonardo Pavan Rocha 299bb47a53 [FIX] hr_fleet: fixes demo data vehicle assignation logs
In the demo data from hr_fleet, we add address_home_id's to some employees in
order to create the correct vehicle assignation logs. However, as the driver_id
is already set at that moment, the _compute_driver_employee_id is not called
again as no dependency was changed, resulting in an empty driver_employee_id
for some logs. This commit fixes this by calling the compute method on the demo
data with the assignation logs that have no driver_employee_id set and have a
driver_id.

task-2742923

Part-of: odoo/odoo#83755
2022-05-24 15:59:56 +02:00
Yannick Tivisse 24713b76b5 [REV] fleet: Revert multiple fleet mechanism
I don't get why you don't get it...

Partial revert of the taskID: 2415309
Com PR: https://github.com/odoo/odoo/pull/70313
Ent PR: https://github.com/odoo/enterprise/pull/18114
Upg PR: https://github.com/odoo/upgrade/pull/2447

closes odoo/odoo#75475

Related: odoo/enterprise#20406
Related: odoo/upgrade#2765
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-25 12:20:39 +00:00
William Braeckman 5849acab43 [IMP] fleet,hr_fleet: add support for multiple fleets
Add a layer above the vehicle model to separate vehicles from different
fleets.

Task ID: 2415309
2021-07-09 14:51:26 +02:00