-
- Downloads
[MERGE] hr_timesheet: Improve Timer, Access Rights and Validation
Access rights ============= Purpose ------- Currently, the lowest access right level for Timesheets allows a user to see the timesheets from all employees. Some companies do not want to have this information shared. As we already have three levels of access rights, creating a new one would be too much. Instead, we are using this opportunity to clean/simplify the current access right levels. Specification ------------- Remove the current access rights and replace them with the following: - 'See own timesheets' the user can: - read/write/create/delete his own timesheets only - cannot timesheet on projects whose Visibility is set on 'Invited employees' if the user is not a follower - see the 'My Timesheets' and the 'Timesheet App' menus - 'See all timesheets' the user can: - read/write/create/delete all timesheets - cannot see the Timesheets of Projects whose Visibility is set on 'Invited employees' if the user is not a follower - see the 'My Timesheets' + 'All Timesheets' + 'Timesheet App' + 'To Validate' menus - validate the timesheets of whom he is the 'Timesheet Responsible' or the 'Manager' - 'Administrator' the user can: - read/write/create/delete all timesheets - see all menus - validate the Timesheets of all employees - Write tests New Validation Process ====================== Purpose ------- Currently, timesheets are validated by employees as a whole. However, as a manager, it is difficult to evaluate the timesheets of an employee for projects you know nothing about. Therefore, it would make more sense for a manager to validate the timesheets of his projects and to leave the rest to the other managers. In addition, having a date on the employees leaves room for error and performance issues, so we are introducing a new checkbox at the timesheet level. Specification ------------- Remove the 'Timesheets Validation Date' field on the employee - replace it with a 'Timesheet Validated' checkbox (hidden field) on the timesheet entry - By default, this field is set to false - Once the manager validates the timesheets, switch the field to true - Filtering on 'Validated' timesheets should display timesheets for which 'Timesheet Validated' is true - Filtering on 'Non-Validated' timesheets should display timesheets for which 'Timesheet Validated' is false Rename the title of the validation menus into: - To Validate > Last Weeks -> Timesheets from Last Week to Validate - To Validate > Last Month -> Timesheets from Last Month to Validate Grid view: display projects on which the user timesheeted in the past 30 days (group_expand), or the employees who timesheeted in the past 30 days for the 'To Validate' menus) Open the 'To Validate' menus on the oldest non-validated timesheet you can find. Clicking on 'Validate' should validate all the timesheets displayed on the screen. List all the elements displayed in the view based on the group by applied in the 'Validate the timesheets' modal. When validating timesheets, bypass timesheets that were already validated in the past in order to avoid performance issues Timer list ========== Purpose ------- Have an overview of the timesheets you need to do during the day. Easily track time spent on tasks using the timer instead of having to write down somewhere at what time you started an activity. Allow more flexibility if an activity if interrupted by another one (so you don't need to do mental arithmetic to determine how much time the first activity took substracted by the time spent on the second activity). Specification ------------- - Move the time from fsm to hr_timesheet. - Add fa-play-circle and fa-stop-circle icons in the 'My Timesheets' menu: - on the left of the 'Duration' field in the list view - on the top right corner of the kanban card in the kanban view - on the right of the first column in the grid view - Display these icons - for non-validated timesheets only - if the Encoding Unit is Hours - Clicking on the play button should start and display the timer and switch to the stop icon - Clicking on the stop button should halt and stop displaying the timer and switch to the play icon - While the timer is running, the 'Duration' field should not be editable - Only one timer can run at the same time. If the user clicks on the start button of timesheet B while the timer is running for timesheet A, timesheet B should start and timesheet A should stop. Time selection when invoicing ============================= Purpose ------- Allow selecting a timeframe to invoice when the user is invoicing on a periodical basis. For instance, the user invoices each time at the end of the month. For some reason (he got sick, there was a bank holiday...), he only invoices of the 4th of the following month. Now the timesheets that are about to be invoiced include some that were recorded in the meantime. Specification ------------- - Add an 'Invoice timesheets up to mm/dd/yyyy' field on the Invoice Creation modal - display this field only when creating an Invoice for a Service whose Invoicing Policy is on 'Timesheets on tasks' - not required - Set today's date by default - if this field is set, the quantity to invoice should only include the not yet invoiced (and validated) timesheets up to this date (included) - if this field is not set, include all not yet invoiced (and validated) timesheets without distinction. - Add the following tooltip: Only timesheets not yet invoiced (and validated, if applicable) up to this date included will be invoiced. If no date is indicated, all timesheets not yet invoiced (and validated, if applicable) will be invoiced without distinction. Miscellaneous ============= Purpose ------- Small usability improvements. - Move 'Create SO from Task' to sale_timesheet -> Means Enterprise to Community). - Add the pivot view to the 'All Timesheets' menu - Add the 'Today' button on the grid view of all menus (see the Reporting > Timesheets by Project menu for reference) closes odoo/odoo#40495 Taskid: 2088586 Signed-off-by:Yannick Tivisse (yti) <yti@odoo.com> Co-authored-by:
Lucas Lefèvre <lul@odoo.com> Co-authored-by:
Yannick Tivisse <yti@odoo.com>
No related branches found
No related tags found
Showing
- addons/account/models/account_analytic_line.py 0 additions, 1 deletionaddons/account/models/account_analytic_line.py
- addons/account/security/account_security.xml 0 additions, 4 deletionsaddons/account/security/account_security.xml
- addons/hr_timesheet/__init__.py 1 addition, 0 deletionsaddons/hr_timesheet/__init__.py
- addons/hr_timesheet/__manifest__.py 1 addition, 0 deletionsaddons/hr_timesheet/__manifest__.py
- addons/hr_timesheet/data/hr_timesheet_data.xml 8 additions, 8 deletionsaddons/hr_timesheet/data/hr_timesheet_data.xml
- addons/hr_timesheet/data/hr_timesheet_demo.xml 5 additions, 0 deletionsaddons/hr_timesheet/data/hr_timesheet_demo.xml
- addons/hr_timesheet/models/__init__.py 1 addition, 0 deletionsaddons/hr_timesheet/models/__init__.py
- addons/hr_timesheet/models/hr_timesheet.py 74 additions, 13 deletionsaddons/hr_timesheet/models/hr_timesheet.py
- addons/hr_timesheet/models/project.py 71 additions, 9 deletionsaddons/hr_timesheet/models/project.py
- addons/hr_timesheet/models/res_config_settings.py 2 additions, 0 deletionsaddons/hr_timesheet/models/res_config_settings.py
- addons/hr_timesheet/models/timer_mixin.py 65 additions, 0 deletionsaddons/hr_timesheet/models/timer_mixin.py
- addons/hr_timesheet/security/hr_timesheet_security.xml 33 additions, 29 deletionsaddons/hr_timesheet/security/hr_timesheet_security.xml
- addons/hr_timesheet/static/src/js/Timer.js 115 additions, 0 deletionsaddons/hr_timesheet/static/src/js/Timer.js
- addons/hr_timesheet/static/src/js/timer.js 63 additions, 0 deletionsaddons/hr_timesheet/static/src/js/timer.js
- addons/hr_timesheet/static/src/js/timer_toggle_button.js 77 additions, 0 deletionsaddons/hr_timesheet/static/src/js/timer_toggle_button.js
- addons/hr_timesheet/static/src/js/timesheet_kanban_view.js 34 additions, 0 deletionsaddons/hr_timesheet/static/src/js/timesheet_kanban_view.js
- addons/hr_timesheet/static/src/js/timesheet_list_view.js 34 additions, 0 deletionsaddons/hr_timesheet/static/src/js/timesheet_list_view.js
- addons/hr_timesheet/static/src/js/timesheet_uom.js 87 additions, 20 deletionsaddons/hr_timesheet/static/src/js/timesheet_uom.js
- addons/hr_timesheet/static/src/scss/timer_button.scss 26 additions, 0 deletionsaddons/hr_timesheet/static/src/scss/timer_button.scss
- addons/hr_timesheet/tests/test_timesheet.py 19 additions, 3 deletionsaddons/hr_timesheet/tests/test_timesheet.py
Loading
Please register or sign in to comment