Commit Graph
8 Commits
Author SHA1 Message Date
Martin Trigaux 80e97e98ce [IMP] *: use named placeholders in translated message
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
2020-06-18 13:03:34 +02:00
RomainLibert acd8638575 [IMP] hr_fleet: Adapt module with new hr.employee.public model 2019-05-31 10:21:21 +02:00
Christophe Simonis 2c5c9b8342 [MERGE] forward port branch 12.0 up to c023d0784f 2019-03-08 17:56:14 +01:00
Christophe Simonis f927c68ddb [MERGE] forward port branch 12.0 up to cb8fefa899 2019-01-31 16:59:58 +01:00
Lucas Lefèvre 607fd63545 [FIX] hr_fleet: fix access rights with employees without user
Commit 55a48e3 added support for computing car count and car reports
for employees without a linked user..
It is computed by accessing the field `address_home_id` (res.partner) to find the driver.
However, this field is private.
Therefore a user in `fleet_group_manager` has an ACL error when accessing
an employee form view which contains a stat button with the car count.

This commit compute the car count and the car report
with `address_home_id` as sudo to fix the issue.

Also fix a typo in attribute `groups` instead of `group` and fix its
value from `fleet_manager` to `fleet.fleet_group_manager`.
2019-01-25 10:37:27 +00:00
Yannick Tivisse 55a48e3415 [FIX] hr_fleet: Make 'Claim Report' work for employee without users
If an employee is not linked to an user, the claim report feature won't work.

With this commit, the report can be printed base on the user's partner or
the private employee address.

closes odoo/odoo#30065
2019-01-09 10:48:39 +00:00
Christophe Simonis e1f9499d26 [MERGE] forward port branch 12.0 up to 053bb45706 2018-12-05 18:46:15 +01:00
jbm-odoo 22ee6ebbfc [ADD] hr_fleet: Add claim report and cars history per employee
Purpose
=======

When an employee leaves the company, the fleet manager must ask to the insurance company
a claim report for this employee. But in oddo, there is no easy way to have an history
of the drivers.

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

1/ On the employee form, add a stat button: "x cars". The button shouldn't be displayed if the count = 0.
   Make a bridge (auto_install: True in the manifest) depending on hr (hr.employee) and fleet (fleet.vehicle.assignation.log)
   - Add a field employee_cars_count (computed) to count the amount of cars the employee drove.
   - Add an method action_open_employee_cars, that return an action (ir.actions.act_window)
     that open on the fleet.vehicle kanban filtered on cars the employee had driven.
2/ In this bridge module, add on the fleet.vehicle.assignation.logs a button (like in expense) to upload
   documents about the car for a particular employee (PV, rapport d'assurance, blabla). On the employee
   form view, add an action button (with groups fleet_manager) to print all the related documents
   (all the attachements on the fleet.vehicle.assignation.logs for the employee).

closes odoo/odoo#28077
2018-11-06 13:01:57 +00:00