Commit Graph
52 Commits
Author SHA1 Message Date
Kevin Baptiste ba619ce027 [IMP] hr_holidays: allow users to cancel Time Off
A user without Time Off rights is now allowed to cancel their own
validated time off when:
    - It's not yet started;
    - No work-entries has been generated for it yet.

The time off is archived and the days taken reallocated.

closes odoo/odoo#76722

Taskid: 2643713
Related: odoo/upgrade#2843
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-10-28 11:34:57 +00:00
254d6a71e8 [IMP] hr_holidays: Improve Accruals, dashboards and general UX (Back2basics)
Purpose
=======

Time Off : New Dashboard, Accruals feature, Public holidays, New time off type configuration view.

- Review of Dashboard
- Accrual feature : Currently, when you create an allocation, it's possible to create an
  Accrual, but there is no appraisal Plan. An Appraisal plan is use to define steps of accruals
  for each employee.
  In Belgium, we use accrual Allocation for European Leaves, or compensatory hours, it's a
  simple use case.  But in USA, it's possible to change the calculation mode each year.
  Also, in USA, it's possible to deal your accrual plan when you arrive on the company. It's a
  HR Officer task to create the right Accrual allocation for each new employee.
- Public Holidays :
  Improvement of global time off feature located on Working hours calendar. Now, Time off
  application have to manage Public Holidays.
- Review of Time Off type configuration

COM PR: https://github.com/odoo/odoo/pull/72511
ENT PR: https://github.com/odoo/enterprise/pull/19157
UPG PR: https://github.com/odoo/upgrade/pull/2791
TaskID:2475413

closes odoo/odoo#72511

Related: odoo/enterprise#19157
Related: odoo/upgrade#2791
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: William Braeckman <wbr@odoo.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2021-09-02 12:57:03 +00:00
Nisha patel adf3c610c7 [FIX] hr_holidays: Improve displayed information on calendar leaves
See task pad for complete information.

closes odoo/odoo#58168

Taskid: 2314838
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-10 14:21:24 +00:00
Kevin Baptiste b8a8ad27de [FIX] hr_holidays: "Everyone" view on calendar_event
Purpose
=======

Avoid to show to much information to leave responsibles.

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

- Dynamically add/remove the leave_manager_ids on the group
  group_hr_holidays_responsible, on employee creation/modification
- Retrict the available employees when creating a leave. For
  manager/users : Everyone. For responsibles: The employee for
  who the user is responsible. Otherwise: Only me.
- Don't obfuscate the leave name on employees for who I'm the
  responsible.
- Add a new SQL view for "Everyone" report. To select only the
  information we want to share instead of showing the hr.leave
  model directly.

closes odoo/odoo#47659

closes odoo/odoo#49765

Taskid: 2206862
Related: odoo/enterprise#9239
Related: odoo/enterprise#10021
X-original-commit: 781147dcaf1552b8f2ab687ed73034b8fd1f7352
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-20 09:19:48 +00:00
Martin Trigaux 65530dfd6a [ADD] *: add ir.model.access on all transient models
Following changes needing ir.model.access on transient models too.
Remove groups declaration on the action to move it to ir.model.access
when possible.
Rules are strict by default with no unlink access by default and high
priviledge asked. Adaptations may be needed later.
Write access is given as a wizard may need to be modified in case the
action triggers an error and the user has to correct a value

account*: use account.group_account_user for all transient by default
	  remove account.print.journal relic
stock*: use stock.group_stock_user by default
survey: survey user can send invitations
mail: allow any employee to execute wizards
      additional verifications are made to ensure they are executed
      only on the documents the user has access to you
      give portal access to mail.compose.message as portal still does
      some actions like posting messages on the forum
      add ir.rule to avoid reading somebody else messages
      increase the query count because of undeterminist count
crm: saleman for lead2opp, manager for massmailing
     partner manager for actions linked to partners
     avoid a write in test_lead_lost
sms: any employee can send sms
mrp: mrp user can execute wizards
     give unlink access as making write during do_produce operation
base_import: employees can import files
delivery: stock user can deliver
event_sale: sale user can configure the wizards
	    event user inherit from  sale rights
gamification: employee can give badge
google_service: resolve FIXME
hr: add specific rights
    manager can set a plan according to group on button
    anyone who can write on an employee can register a departure
hr_expense: set rights based on buttons
hr_holidays: an approver can make a summary report
hr_recruitment: recruiter can refuse a candidate
hr_timesheet: can use the wizard if can create a timesheet
l10n_eu_service: managers can create fiscal positions
mass_mailing: same group as on mass.mailing.list
membership: accountant can create invoice from membership
payment: accountant can create a link
	 as the source is an account.move
	 keep the payment.acquirer.onboarding.wizard to system user
	 only as it is called during company configuration
point_of_sale: PoS manager only can use wizards
	       never create closing_balance_confirm_wizard records
product_expiry: stock user has rights on stock.picking
product_margin: access from accounting menus
repair: same rules as for above models
sale: set ir.rule for self wizard only
      add rule from model introduced in payment to add salesman group
sale_crm: saleman can create a quotation from a lead
sale_coupon: any saleman can generate coupon
	     add self ir.rule
sale_product_configurator: salesman can select product variants
snailmail: employee can send letters
website: designers can write on website
website_crm_partner_assign: same rule as group on action
website_sale: sale ACL as for payment.acquirer.onboarding.wizard
website_slides: anyone can send invitation

base: base.language.*: allow employee (cf lang_install)
      change.password.user: can not read change password wizard of
      other users
      test.*: no access is needed

Courtesy of Damien Bouvy, William Andre and Antoine Prieëls for review
of acl
2020-02-04 17:54:18 +01:00
RomainLibert c1530f219b [IMP] hr_holidays: improves access rights of manager/officer
We need to have a clear distinction between holidays managers and
holidays officers.
For this a number of improvements have been done in hr_holidays.
For more informations about the changes see the docstrings of hr.leave
and hr.leave.allocation.

Task #34222
Closes #19270
2018-04-09 17:49:51 +02:00
Thibault Delavallée 1d71c06233 [IMP] hr_holidays: improve activity management on leave model
This commit improves leave request and allocation management through a
better integration of activities and addition of automated activities.
Several things are done in this commit :

 * leave and allocation models do not inherit from mail.activity.mixin.
   This commit adds the inherit so that HR users and managers can now
   schedule and manage activities on leave and allocation requests. This
   will help them in their daily job;
 * automatic activities generation is added for leave and allocation.
   Activities are generated for approval and second approval. They are also
   automatically set as done when validating or unlinked when refusing or
   resetting to avoid bloating users with unnecessary activities;
 * a menu to configure activity types is added. Indeed HR managers should be
   able to see and configure activity types related to their job;
 * filters are added to be able to use the systray and to filter the kanban
   view based on activities

Having automated activities allow to replace some messages and tracking
that were implemented to warn people of leave and allocation to approve
or validate. This commit therefore

 * simplifies the tracking as only approved or refused state now trigger
   a subtype;
 * removes to approve and to validate subtypes on leave and allocation
   model as well as their parent subtypes on the department. This allows
   to simplify chatter a lot in hr_holidays app;
2018-03-27 15:19:10 +02:00
RomainLibert f61687a4cd [IMP] hr_holidays : split hr.holidays into hr.leave and hr.leave.allocation
Purpose
=======

Have a clear distinction between leave and allocation requests instead of
using the same model to mix 2 different concepts.

Splitting the model will allow different business code to be run on each
model as allocations and leaves are not exactly the same thing; this
will add some code but simplify future improvements

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

1/ Completely separate the models

Model hr.holidays has been split into leave.request and
leave.allocation.

2/ Make reporting working again by using an SQL view aggregating data
from leaves and allocations

A new report has been added in order to aggregate
datas from both allocations and requests. The views have been modified
accordingly.
2018-01-15 10:38:31 +01: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
jke-openerp 46b0c7aa00 [REF] Rename model crm.meeting into calendar.event
Remove 2 unsused field from calendar.event model (dir,sequence)

bzr revid: jke@openerp.com-20140115093805-1g1j1oymyxsb6kgh
2014-01-15 10:38:05 +01:00
jke-openerp eeb4e9629f [TYPO] Replace base_calendar to calendar in csv security
bzr revid: jke@openerp.com-20131219160620-kcjrqv0uald99qqe
2013-12-19 17:06:20 +01:00
jke-openerp b4af563c5e [FIX] Add right in security of hr_holidays to allow hr user to delete attendee
bzr revid: jke@openerp.com-20131126190610-ow8qwiajddi7gvdy
2013-11-26 20:06:10 +01:00
Thibault Delavallée 08b0784e76 [IMP] hr_holidays:
- added a workflow transition from refuse to draft, to allow resetting
a refused request
- resetting is now based on a can_reset field, taht is based on whether
it is my own request or I am an hr manager
- added an access right on crm_meeting that was preventing hr officers
to validate some requests
- improved form view to show reset to draft button accordingly
- added tests that helped trigerred the various bugs and improvements

bzr revid: tde@openerp.com-20130809144752-o21pjbc56o0t8fym
2013-08-09 16:47:52 +02:00
Quentin (OpenERP) fc8855fa74 [MERGE] merged branch with leave request improvements
bzr revid: qdp-launchpad@openerp.com-20120831144244-40apxljf6juyv3nv
2012-08-31 16:42:44 +02:00
Meera Trambadia dbcd304455 [IMP]:changed the id,name from 'manager' to 'user'
bzr revid: mtr@tinyerp.com-20120731103215-vc0wx0kiy7d8x6ka
2012-07-31 16:02:15 +05:30
Meera Trambadia f16696174f [MERGE]: branch merged with lp:openobject-addons
bzr revid: mtr@tinyerp.com-20120731070125-n8mza516sbpta515
2012-07-31 12:31:25 +05:30
Meera Trambadia 21df649697 [IMP]:improved access rights and added ir.rule for HR/Officer
bzr revid: mtr@tinyerp.com-20120726123517-l9gc3tn9efl8wwep
2012-07-26 18:05:17 +05:30
Stephane Wirtel e3c2297d43 [FIX] hr_holidays: security fix in the rights
bzr revid: stw@openerp.com-20120726114321-xx4j4acudjmgeoe6
2012-07-26 13:43:21 +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
Fabien Pinckaers 65b33b9489 [FIX] Cleaning hr holidays reporting and dashbaords
bzr revid: fp@tinyerp.com-20101229165130-jfr2h23jo7mrjqzu
2010-12-29 17:51:30 +01:00
François Degrave 50cf154537 [IMP] HR employee dashboard in webclient
bzr revid: fde@openerp.com-20101229143849-03lpmdpu5fkc6e86
2010-12-29 15:38:49 +01:00
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
AMP (OpenERP) b77cad685a [MOD/IMP] hr_holidays : Remove Leave Analysis report and changes in view file
bzr revid: amp@tinyerp.com-20101013132317-do4ylbfso07qdc66
2010-10-13 18:53:17 +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
AMP (OpenERP) 746c238fde [MOD/IMP]hr_* : Usability Improvement in Dashboards
bzr revid: amp@tinyerp.com-20100923071913-32cv0gf0l2r61s0x
2010-09-23 12:49:13 +05:30
AMP (OpenERP) a640ecc89e [IMP]hr_holidays : Usability improvement in grops
bzr revid: amp@tinyerp.com-20100922062331-gchm37fo6oq60wgz
2010-09-22 11:53:31 +05:30
Vir (Open ERP) 1e9167f9a9 [IMP] hr_* : Usability improvements
bzr revid: vir@tinyerp.com-20100922053937-5gah2r12uvewy210
2010-09-22 11:09:37 +05:30
AMP (OpenERP) 3076f2e33a [MOD]hr_*: usability improvement in access rights
bzr revid: amp@tinyerp.com-20100913131824-1au2kx7na9czsh4z
2010-09-13 18:48:24 +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 (OpenERP) 1d15f71146 [MOD] project_timesheet,hr_* : usability improvement in access rights
bzr revid: amp@tinyerp.com-20100901132905-hslnywxf4zxogxdo
2010-09-01 18:59:05 +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
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) 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
AMP (OpenERP) 3e2e131a73 [MOD] improvement in access rights
bzr revid: amp@tinyerp.com-20100727113352-r343qcc2fux21an7
2010-07-27 17:03:52 +05:30
UCO (OpenERP) 3217cf7e4c [REM]: Removed access rules for OSV memory objects
bzr revid: rpa@tinyerp.com-20100628134938-23kiccr4355jfhmg
2010-06-28 19:19:38 +05:30
Fabien Pinckaers 672f3e8d6c [IMP] access rights improvements
bzr revid: fp@tinyerp.com-20100611125528-mlhkzlditz2awk1k
2010-06-11 14:55:28 +02:00
nel@tinyerp.com 16e468b01b [IMP] search views
bzr revid: nel@tinyerp.com-20100408142924-j4vvkcbcw20gdtzy
2010-04-08 16:29:24 +02:00
Vir (Open ERP) da25c77aa6 [ADD] access rules for holiday reports
bzr revid: vir@tinyerp.com-20100407133731-6599szskqnsso9de
2010-04-07 19:07:31 +05:30
qdp-launchpad@tinyerp.com e328055359 [IMP] hr_holidays: improvements
bzr revid: qdp-launchpad@tinyerp.com-20100317170926-zyw5frdscx3kpi1p
2010-03-17 18:09:26 +01:00
Vir (Open ERP) b96373c325 [ADD] hr_holidays : security rules are added
bzr revid: vir@tinyerp.com-20100315122750-bofdomun28eqw2ky
2010-03-15 17:57:50 +05:30
YSA (OpenERP) 4f32899799 [IMP]: Improved some security files for access rules.
bzr revid: uco@tinyerp.co.in-20091212065410-1pgd5ywl3fyxtqkn
2009-12-12 12:24:10 +05:30
HDA (OpenERP) 7d3a5b51ba [Merged] stable and trunk addons
bzr revid: hda@tinyerp.com-20090924104621-7p53erkfs9xa0bev
2009-09-24 16:16:21 +05:30
mra (Open ERP) 63b4c5d512 hr_holidays
bzr revid: mra@tinyerp.com-20090313062553-azyc55dpa7d20mit
2009-03-13 11:55:53 +05:30
Fabien Pinckaers ff9a7525c4 bugfix
bzr revid: fp@tinyerp.com-20090124131329-635ywxv5i4hdsh16
2009-01-24 14:13:29 +01:00
Fabien Pinckaers d9a8d22ef2 bugfix
bzr revid: fp@tinyerp.com-20090124020317-pvob47mthxi3omf7
2009-01-24 03:03:17 +01:00
Christophe Simonis 123a99c39a fix access rules
bzr revid: christophe@tinyerp.com-20081021153441-af1qtobtazu7rs28
2008-10-21 17:34:41 +02:00
Christophe Simonis d3ce446ec0 fix and complete access rules
bzr revid: christophe@tinyerp.com-20081017084109-i1r4zigf7wp3o6i5
2008-10-17 10:41:09 +02:00