Commit Graph
12 Commits
Author SHA1 Message Date
Thibault Delavallée a7ac71ed44 [FIX][IMP] various: perform small cleanup of mail templates
Notably
 * remove cdata and fix html code when necessary;
 * re-order fields declaration to have globally the same order in various
   template definition;
 * remove unnecessary reply-to, make user signature and auto delete fields
   explicit when necessary;
 * improve some name to ease template ordering and understanding in the
   template list view;

Related to task 1972615
Linked to PR #32872

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-23 14:26:50 +00:00
Thibault Delavallée 0b74c9ab6e [FIX][IMP] various: improve recipients computation in mail templates
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.

Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
jbm-odoo 4b7f05face [IMP] hr(_presence): Merge reporting menu
hr_prensence add a menu 'reports' in employee app and

hr_contract_dashboard add a 'Reporting' menu.

Merge both together.

closes odoo/odoo#32377

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-04-18 08:07:43 +00:00
Martin Trigaux 04370bff18 [I18N] export saas-12.2 source terms
closes odoo/odoo#31985

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-20 14:59:50 +00:00
Lucas Lefèvre d77ce4c2a9 [IMP] hr_*: introduce the employee profile
General Purpose
===============

We want an 'Employee profile' gathering every data about an employee.
The main form view is modified to become this employee profile.
A user can also see his own profile through the Preferences menu.
The new profile replaces the current Preferences view if the hr module is installed
and the current user is linked to an employee.

A user should be able to see and edit his own profile.

*Problem*:
Many fields on hr.employee are protected by groups="hr.group_hr_user".
Therefore, a regular user cannot see or edit those fields.

This protection must be bypassed to allow read/write access
to the regular user's own data.
A similar mechanism already exists for res.users (for Preferences)

The better (least worst) solution found is to reuse this mechanism by adding related fields on res.users.

Pros:
- Don't change security access on hr.employee
- Don't implement yet another custom security layer, risking to add new security breaches
- A lot of fields are added by other modules on hr.employee.
  It would have required to integrate them with the custom security layer.
- Fields added by other modules on the user's preferences view (normal view, not the profile)
  are automatically included in the employee's profile view.
- Allow the hr.employee form view to be different than the user profile accessible
  through the Preferences menu.
  E.g. add custom buttons only relevant to the logged in user such as "Request a leave".
Cons:
- Each field from hr.employee that you want to appear on its profile
  must be added as a related field on res.users
- Those related fields must be added to user's preferences view (duplicate views)
- They also must be added to SELF_[READABLE | WRITABLE]_FIELDS

Note:
When the front-end loads the views it gets the list of available fields
for the user (according to its access rights). Later, when the front-end wants to
populate the view with data, it only asks to read those available fields.
However, in this case, we want the user to be able to read/write its own data,
even if they are protected by groups (groups are kept on the related fields on res.users).
The front-end need to be made  aware of those fields by sending all field definitions.

hr_attendance
=============

This commit integrate attendance in the new employee profile.
It also adds a stat button to this employee profile showing
the number of hours worked last month.

Remove the boolean computed field 'manual_attendance'.
This field is just a shortcut to add/remove the employee's user
in the "Manual Attendance" group.
The checkbox is confusing on the employee's form and this should
be done through the normal group management screens.

hr_presence
===========

Display the presence status on the employee kanban template.
The status is a colored chip which can be green (present),
orange (to define) or red (absent).

Currently, the presence status is only computed when accessing
the report view. As this commits displays it on the employee kanban,
it should be updated more frequently.
The state should not be updated every time the kanban view is loaded
since the computation is a bit heavy. Instead: add a cron to update
status every 15 minutes.
-> The status is accurate on the report view (status is still updated
   when loading the view)
-> The status in accurate at 15 minutes on the kanban view

[ADD] hr_attendance_presence
============================

Bridge module between hr_attendance and hr_presence.

This commit integrates hr_presence module in the employee
profile and adds the presence status on the employee kanban view.
But hr_attendance adds at the same place a similar status icon for
checkin/checkout.
This bridge module makes the status from hr_presence invisible as
hr_attendance should be the main presence control mechanism.

Also, this commit adds the ability (through a new setting option)
for hr_presence to take into account checkin/checkout to determine
the presence status.

l10n_be_hr_payroll
==================
integration with employee profile
2019-02-14 16:28:54 +01:00
jbm-odoo a3daff6bc1 [IMP] hr_holidays: Rename 'leave' into 'time off' + add dashboard
Purpose
=======

We need to use an international word to define holidays and leaves, rename everything into Time Off.
Employees needs a good dashboard and leaves summary

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

1/ Add a new dashboard: https://balsamiq.cloud/sm5j0d/pg5w04r
   Create a new dashboard with a calendar and a summary of all time off and time off request
2/ Rename leaves into Time Off everywhere
3/ Improve general usability

TaskID: 1916871

closes odoo/odoo#29634
2019-01-21 11:29:30 +00:00
Martin Trigaux af69902ecc [I18N] export saas-12.1 source terms
closes odoo/odoo#29730
2018-12-24 11:07:31 +00:00
jem-odoo 352807298f [FIX] hr_presence: propagate options in longpolling
The hr_presence module recently introduced adds
a hook on the bus controller in order to execute
its very important and legally business, but this
hook brings an error as it forgot to propagate the
bus options.
Consequence: the bus_inactivity, responsible of the
bus.presence are not pass to super. So all user
appears offline.

closes odoo/odoo#28531
2018-11-09 13:04:34 +00:00
Yannick Tivisse 63f52941e0 [IMP] hr_presence: Open the leave request form instead of the leaves list 2018-11-07 16:30:29 +00:00
Yannick Tivisse 32051efdc9 [IMP] hr_presence: Don't notify followers when sending a email 2018-11-07 16:30:29 +00:00
Yannick Tivisse faf90c4f52 [IMP] hr_presence: Allow to force the presence of an employee 2018-11-07 16:30:29 +00:00
Yannick Tivisse c0c72f027d [ADD] hr_presence: New module to control employees presences
Purpose
=======

A lot of companies don't use the module hr.attendance but are faced
to employees distraction, they forget to record leaves.

In big companies, it is not easy to controle presence and
check if everyone is present in the office.

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

1/ Review Human Resources menuitems

- Employees
- Contract
- Department
- Reports
    - Employee Presence
- Configuration
    - Settings
    - Employee
        - Tag
    - Contract
        - Types
        - Templates
    - Challenges
        - Challenges
        - Badges
        - Goal History

2/ Add option in hr settings to decide the company policy

[ ] Controle Presence of Employees
    [ ]  According the system login --> Based on the bus presence (Present if 'away' or 'online')
    [ ]  Following number of sent emails --> Based on the sent mail.message during the day
    [ ]  According to the IP address --> Based on the ip address when requesting a long polling, stored on a res.users.log

3/ Add an employee presence view

This view is only for the hr manager and the data is computed when the hr manager goes to it

Clicking on this menu item will generate all kanban of employees grouped by state (present, absent, to define)

On each employee cart, an action can be requested as:
- Send a sms to the employee
- Send an email to the employee
- Create a leave for the employee

4/ Use this email template to contact the employee

Dear %(employee_name)s,

Exception made if there was a mistake of ours, it seems that you are not at your office and there is not request of leaves from you.

Please, take appropriate measures in order to carry out this work absence.

Do not hesitate to contact your manager or the human resource department.

Best Regards,
2018-11-06 15:18:06 +00:00