[6.0] Incorrect permissions on hr.timesheet_sheet workflow causes multiple issues for normal employees
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
High
|
Unassigned | ||
6.0 |
Fix Released
|
High
|
OpenERP Publisher's Warranty Team |
Bug Description
As described in the comments of the bug, the root issue here is the fact that the NEW->DRAFT workflow transition is restricted to the HR Officer groups, whereas it should be allowed for any Employee. In fact the second transition DRAFT->CONFIRM should also be allowed for any Employee, as it is the proper way to submit your own timesheet to your manager for approval.
The group restriction on these transitions should be adapted accordingly.
====== original description below ======
Hi,
When clicking on My Timesheet menu entry, a new timesheet is created, even if a timesheet already exists for the current week.
How to reproduce:
- openerp 6.0 series with demo data
- login with fbs/fbs
- go to Human Resources / Time Tracking / My Timesheet
- save the new timesheet
- go to Human Resources / Time Tracking / My Timesheet agin
- save the timesheet
- error: Error occurred while validating the field(s) date_from,date_to: You can not have 2 timesheets that overlaps !
Please use the menu 'My Current Timesheet' to avoid this problem.
IMO, this is due to a fact that the query for existing timesheet filters on (state='draft'). This filter on state should be removed.
Proposed patch attached.
Best regards,
-sbi
Related branches
- Anup(SerpentCS) (community): Approve
- Olivier Dony (Odoo): Approve
-
Diff: 19 lines (+2/-2)1 file modifiedhr_timesheet_sheet/hr_timesheet_workflow.xml (+2/-2)
Changed in openobject-addons: | |
status: | Invalid → New |
Changed in openobject-addons: | |
status: | Opinion → Confirmed |
tags: | added: maintenance |
I also noticed that when you save the timesheet opened from "My Timesheet" it stays in the "new" state and therefore the Confirm button does not appear.
-sbi