Commit Graph
53 Commits
Author SHA1 Message Date
Kevin Baptiste 9e6d2da504 [IMP] hr_attendance: compute overtime on attendances
This commit adds a new model `hr.attendance.overtime`.

When an employee checks out, an overtime entry will be created when:
    - the option is enabled on the company;
    - the employee worked more or less than the number of hours they
    were supposed to work that day.

TaskID: 1904850
2021-07-06 11:35:01 +02:00
Kevin Baptiste 8c5bfd351a [IMP] hr_attendance: show own attendances
Users with the rights 'Manual Attendance' get (read-only) access to their
own attendances.

closes odoo/odoo#66934

Taskid: 2438863
Related: odoo/upgrade#2216
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-01 13:33:35 +00:00
nie 57b52e80e7 [FIX] hr_attendance: user can see other users attendances
Steps:
- As admin, go to Settings > Users & Companies > Users
- Edit Mark Demo (demo)
- In Human Resources > Attendances, select Manual Attendance or blank
- As demo, go to My Profile
- Click the smart button showing the hours worked for the last month
- Remove all filters

Bug:
The demo user, who hasn't the rights to see the other employees
attendances, can see them.

Explanation:
Every user must have the right to read attendances in order to see their
own attendances. Not giving the users the read rights in the security
record rule prevents the record rule from being applied when reading
attendances. This makes the read access rights the only rule and allows
everyone to see the attendances of the others.

This commit also fixes the default selected employee when going to the
attendances tree view on these paths:
- User
- Employee
- User > Employee

In fact, sometime, `active_id` is the ÌD of the user and not of the
employee. This leads to incorrect results since another employee's
attendances are shown.

Finally, this commit prevents users from creating attendances from other
apps since only attendance officers and above can have access to the
creation form within the Attendances app.

opw:2440117

closes odoo/odoo#65334

X-original-commit: b3247c81200200590d669b76a58d06e6adf66d69
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-02-01 13:01:06 +00:00
Jorge Pinna Puissant 23b0f38245 [FIX] hr_attendance: multi-company rule
Before this commit, a user with attendance administrator rights can see
the attendances of all users of all companies and not only the companies
he is allowed.

Now, the administrator will only see the attendances of the users of the
companies he is allowed.

opw-2263577

closes odoo/odoo#52355

X-original-commit: 0e8f86795db74fe21daa8776243415291371fdf6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-06-03 12:32:19 +00:00
jbm-odoo be15be7fa6 [IMP] hr_attendance: Introduce Kiosk users group
It's the unique group needed for a kiosk attendance. Avoid to give
to much rigths.

id=2088561

closes odoo/odoo#38954

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-18 12:37:42 +00:00
jbm-odoo ec07e72845 [IMP] base,*: Reorganize access rights groups
Purpose
=======

Access group terminology is missleading. Yous have to be manager to administrate
an application. This task consists to rename groups to be understandable for everyone.

Groups should be reorganised on the users form to be more explicit.

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

1/ Rename 'Manager' to 'Administrator' in users groups.
2/ Define a hierarchy on access groups by using the category_id in the manifests
   A category 'Operations/Project' will create a category Project with a parent
   category 'Operations', and something smart is already developed (in modules/db.py)
   to avoid duplicating categories.
3/ Add a group in expenses to be able to approve expenses reports for my team.
4/ Add a group in timesheets to be able to approve timesheets for my team.
5/ Remove partially the useless crap in ir_module_category_data.xml
6/ Sort access rights groups on users form according to its parent category

closes odoo/odoo#29362

Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
2019-03-05 09:08:12 +00:00
Christophe Simonis 86ff929ad6 [MERGE] forward port branch saas-11.4 up to 1199451606 2018-09-10 17:06:18 +02:00
Yannick Tivisse 4587816198 Revert "[IMP] base: Remove unused module categories"
This reverts commit 382fbd3520.
2018-09-10 14:23:43 +02:00
Raphael Collet 2f7c03d9ca [IMP] base: add regular user admin as uid 2
User 1 simply becomes a technical user (inactive, no password).
2018-08-23 21:38:57 +02:00
Yannick Tivisse 382fbd3520 [IMP] base: Remove unused module categories
The categories other extra rigths and hidden are not used now.
2018-04-26 15:13:38 +02:00
Denis Vermylen 1c2e3d3838 [FIX] hr_attendance, hr_*: move group_hr_attendance to hr_attendance
move group_hr_attendance from hr -> hr_attendance where it belongs.
2017-01-26 19:19:19 +01:00
Denis Vermylen (dve) 2c13736cbf [IMP] attendance: help messages, comments, ...
- improve some help messages
- improve comments
- small refactoring
- add category to group "Manual Attendance"
2016-10-03 15:19:21 +02:00
Yannick Tivisse 7fa2691175 [IMP] hr_*: Split the HR access rights by application
PURPOSE
=======

For each and every Hr application there should be one user category (One app = one category).

SPECIFICATION
=============

HR remains as it is : Employee, Officer, Manager

Each Application should have 2 access rights: User and Manager. Example for Recruitment:
- The user has access to the recruitment process
- The manager has access to the job position configuration

Each Application should grant the employee user access right (Namely the 'HR Officer')
2016-09-06 14:35:09 +02:00
Martin Trigaux 11812b0b9e [FIX] all: remove external ids fakely from base
Several modules defines records with the external ID `base.foo_bar` while it is
created inside this module (typically menus and groups).
While there is no technical reasons to do so but this may introduce issues:

- these records will not be deleted during uninstall
- if a language is loaded before the installation of the module, it won't be
  translated

The uninstallation will only remove the records with an external id linked to
this module (these would only be removed when removing base).

Installing a language before the module will drop the translations not linked
to an existing external id (as it can not be resolved).

This commit correct all the external ids tagged as from base or other incorrect
modules.
2016-09-02 16:14:26 +02:00
Denis Vermylen (dve) 96b88b1275 [IMP] hr_attendance: migration and revamp
- Migration to new API
- MODEL : hr.attendance now has check_in and check_out datetimes plus a computed field worked_hours, no more action (in/out) and no more reason.
          hr.employee has extra fields: pin and barcode and can print a badge containing that barcode.
- the module contains : -> a menu "My Attendances" to check yourself in or out manually.
                        -> a menu "Manage Attendances" with 3 submenus:
                              - "Attendances" where you can edit attendances
                              - "Employees" where you have a kanban view of the employees (to see who's checked in or print badges)
                              - "Kiosk Mode": fullscreen, made to be at the entrance of companies to allow
                                 all employees to check in and out, either with a barcode scanner to scan your badge
                                 or by selecting them in a kanban view and checking in or out manually with or without
                                 entering their PIN.  (enable/disable in Configuration)
                        -> a menu "Configuration" where you can change enable/disable PIN use.
- GROUPS : -> HR manager (base.group_hr_manager): full access to the attendance module.
           -> HR officer (base.group_hr_user): full access except the "Configuration" menu.
           -> Manual Attendances (base.group_hr_attendance): only access to the attendance menu "My Attendance" to check in and out manually in the back-end
           -> Employee (base.group_user): has no access to the attendance module. (should only check in and out through the "Kiosk Mode" put at his disposal)
- Views adaptation to the new fields, addition of a presence indicator (green/red dot) to employee kanban and form views.
2016-07-06 16:32:11 +02:00
Denis Vermylen (dve) 17cd248721 [MOV] hr_attendance: moved files according to new api guidelines 2016-07-06 16:32:11 +02:00
Gaurav Panchal 6e14dd0ef9 [IMP] config: various improvements
- sales_team: demo data enable sales team features to users
- hr_attendance: admin can enable attendance features from hr settings
- multi_company: if admin enable these features, she gets the
  multi-company usability settings
- account: enabling multi-currency functionalities enable pricelist
  functionalities
2015-03-31 17:31:11 +02:00
Xavier Morel 7a2d912964 [REM] bunch of nonsensical @model + @ref
bzr revid: xmo@openerp.com-20130429124333-p1h11fpy04y3sljy
2013-04-29 14:43:33 +02:00
Olivier Dony 3fe6987ce7 [MERGE] Harmonization of noupdate flag on security XML data, courtesy of Alexis de Lattre (Akretion)
ir.rule records are in noupdate data blocks to let the admin
alter them without fear of them being reset at next update.
Other records such as groups are in normal mode, so they
can be updated whenever necessary

bzr revid: odo@openerp.com-20121218232001-t425t4hi7qbmsip2
2012-12-19 00:20:01 +01:00
Fabien Pinckaers fbe0c03df3 [FIX] Attendances rules
bzr revid: fp@tinyerp.com-20120927191804-szqoktzis42qju2h
2012-09-27 21:18:04 +02:00
Pinakin Nayi (OpenERP) 713dff9dba [IMP]group attendance to restrict attendance related fields and views
bzr revid: pna@tinyerp.com-20120921070809-x62vwxdyhw7pyciw
2012-09-21 12:38:09 +05:30
Alexis de Lattre 5101771cd9 Harmonize the noupdate flag on security XML files :
- ir.rule objects are noupdate="1"
- all other objects are noupdate="0"

bzr revid: alexis@via.ecp.fr-20120713170838-pjsysliyt6twazrc
2012-07-13 19:08:38 +02:00
Fabien Pinckaers f27318c8af [IMP] Security Rule: removed duplicates due to inheritancies of groups
bzr revid: fp@tinyerp.com-20111212181113-mhnnbps3ip8ls6pp
2011-12-12 19:11:13 +01:00
Ujjvala Collins (OpenERP) 060b488478 [FIX] hr_xxx: Improved record rules for HR Officer to give him rights to see timesheet, attendance, expense and holidays of other users.
lp bug: https://launchpad.net/bugs/856422 fixed

bzr revid: uco@tinyerp.com-20110929092802-ohpa8xt6at02h449
2011-09-29 14:58:02 +05:30
Mustufa Rangwala 2f09faba42 [MERGE] an employee shouldn't be able to see expenses and holidays of others employee
bzr revid: mra@mra-laptop-20110117102556-evp00eqczxuy5l5z
2011-01-17 15:55:56 +05:30
mtr 028530f9eb [FIX] hr_attendance,hr_expense,hr_holidays: added 'ir.rule' for group 'Employee'
lp bug: https://launchpad.net/bugs/702805 fixed

bzr revid: mtr@mtr-20110117084537-jrsy3wg68io8z8e8
2011-01-17 14:15:37 +05:30
husen f433b959c2 merged with trunk
bzr revid: husen@husen-laptop-20101230095809-cl6dkve1odgdtqtv
2010-12-30 15:28:09 +05:30
François Degrave e678fd472a [IMP] access rights, menus for HR
bzr revid: fde@openerp.com-20101228153417-ps9ql3h4lij87jx8
2010-12-28 16:34:17 +01:00
Fabien Pinckaers 1b69a14e74 fixes
bzr revid: fp@tinyerp.com-20101018143305-mw79ewcj4q0t8t17
2010-10-18 16:33:05 +02:00
Fabien Pinckaers 37680303df [IMP] ir.rule reviewed
bzr revid: fp@tinyerp.com-20101018092840-7a6wv2vw2s6a1a2s
2010-10-18 11:28:40 +02:00
Vir (Open ERP) fc7ac05985 [REM] Removed not used security files
bzr revid: vir@tinyerp.com-20101013073425-03z20ylsxwq1or3y
2010-10-13 13:04:25 +05:30
Vir (Open ERP) eecda53df5 [MOD] improvements in access rights
bzr revid: vir@tinyerp.com-20101008101042-ak2z1vuzbmak7yt3
2010-10-08 15:40:42 +05:30
AMP (OpenERP) 92c78d14e6 [MOD/IMP] hr_* : hr,hr_attendance,hr_contract,hr_expence,hr_timesheet,hr_timesheet_invoice,hr_timesheet_sheet Usability improvement in access rights
bzr revid: amp@tinyerp.com-20101007094729-1sdtsxube9ti5lw2
2010-10-07 15:17:29 +05:30
DBR (OpenERP) 389a623545 [MOD/IMP] hr_* : Usability Improvement in Accessrights
bzr revid: dbr@tinyerp.com-20101007071157-z52414z1sz9h85qh
2010-10-07 12:41:57 +05:30
DBR (OpenERP) a74c490c6d [MOD/IMP] hr_holidays : Usability Improvement in Accessrights
bzr revid: dbr@tinyerp.com-20101006135154-oovxhs611nk4tzso
2010-10-06 19:21:54 +05:30
Vir (Open ERP) 99c74952a7 [MOD] hr,hr_attendance : Improvements in access rights
bzr revid: vir@tinyerp.com-20101006111517-91jab3steqyimmev
2010-10-06 16:45:17 +05:30
AMP (OpenERP) 0a8c9772b6 [MOD]hr_* : usability improvement in employee access rights
bzr revid: amp@tinyerp.com-20100906063006-gcuxdswiunwokvn4
2010-09-06 12:00:06 +05:30
AMP(Open ERP) aff16ab9a5 [MOD/IMP] hr_* : Improvement in access rights
bzr revid: vir@tinyerp.com-20100813133645-w8nex9k1he2zjq9h
2010-08-13 19:06:45 +05:30
amp (OpenERP) bd426f0346 [IMP] crm,hr_*,auction,knowledge,mrp,product,project,sale,survey : access rights improvements
bzr revid: vir@tinyerp.com-20100810134529-wyqlh5d3zabd25gv
2010-08-10 19:15:29 +05:30
DBR (OpenERP) 5f4d7ff09b [MOD/IMP]hr_* modules access right changes in configuration
bzr revid: dbr@tinyerp.com-20100804133252-vh4vbkhmvsev0pnw
2010-08-04 19:02:52 +05:30
DBR (OpenERP) 3e9a0b3ca5 [MOD/IMP]hr_* modules access right changes
bzr revid: dbr@tinyerp.com-20100804112853-issapx9dk7ztcscm
2010-08-04 16:58:53 +05:30
Vir (Open ERP) c6062d0ebe [MOD] hr_attendance: modification in access rights
bzr revid: vir@tinyerp.com-20100804101311-cgl2mzw29sym64t5
2010-08-04 15:43:11 +05:30
DBR (OpenERP) 9261375e2e [MOD/IMP]hr_* modules access right changes
bzr revid: dbr@tinyerp.com-20100804085628-58nplf4yw8zp80dj
2010-08-04 14:26:28 +05:30
DBR (OpenERP) a446dfb18e [MOD] hr_* :Improvement in hr_* modules groups and accessright
bzr revid: dbr@tinyerp.com-20100803131117-jkvf2a7pe955en2u
2010-08-03 18:41:17 +05:30
rpa (Open ERP) 4076708b25 [FIX]: hr_attendance: Problem of duplicate id in access rule
bzr revid: rpa@tinyerp.com-20100712112623-t0xg68chfe96lfln
2010-07-12 16:56:23 +05:30
Harry (OpenERP) 31503e3db8 [FIX] remove security rule of osv_memory object
bzr revid: hmo@tinyerp.com-20100707072453-3w0kw505tbit7h8l
2010-07-07 12:54:53 +05:30
Mustufa Rangwala c179005fc7 [IMP] Clean hr_* module (Still need to done)
bzr revid: mra@mra-laptop-20100703102152-4ulrrzbkorpd7xei
2010-07-03 15:51:52 +05:30
Fabien Pinckaers 65b70827c4 fix_and_better_access_rights
bzr revid: fp@tinyerp.com-20100612220005-4a33xqgs8bvvoa7x
2010-06-13 00:00:05 +02:00
Fabien Pinckaers 1187aae83a [IMP] better views and security rules
bzr revid: fp@tinyerp.com-20100611130853-scoz86mdvte7ynwm
2010-06-11 15:08:53 +02:00
Fabien Pinckaers 672f3e8d6c [IMP] access rights improvements
bzr revid: fp@tinyerp.com-20100611125528-mlhkzlditz2awk1k
2010-06-11 14:55:28 +02:00