Thursday, January 28, 2021
2 changes · master
Resolved issues and error corrections
Fixed an issue in Planning where saving an employee shift as a template could still create and show the shift even after the user clicked discard. Users can now mark a shift for template creation directly in the form, so discarded changes no longer leave unwanted shifts in the schedule.
Original PR description
**Before this commit:** In planning module, when user save employee's shift as template by clicking "Save as template" button at that time the shift is created. Then click on discard didn't prevent that shift and display it on gantt view. **After this commit:** Shift will not be displayed after clicking on 'discard'. Instead of using button (Save as template) adding Boolean field 'template_creation' below 'repeat' field for saving shift as template. **LINKS** Task-2322036
Manual timesheet entry now works better for users whose keyboard requires Shift to type a colon in HH:MM time formats. Grid cells also keep the newly typed value visible while updates are being processed, reducing confusing flicker or temporary value changes.
Original PR description
What are the steps to reproduce your issue ? 1. Install 'timesheet_grid' 2. Try to enter a timesheet with keyboard in the format HH:MM What is currently happening ? With some keyboard layouts shift…
What are the steps to reproduce your issue ?
1. Install 'timesheet_grid'
2. Try to enter a timesheet with keyboard in the format HH:MM
What is currently happening ?
With some keyboard layouts shift button must be used to print ":",
but in timesheet there is already a shortcut with Shift which prevents
to set timesheet properly
What are you expecting to happen ?
When typing, press shift without selecting the whole cell
How to fix the bug ?
Don't trigger the Shift event if renderer is in edit mode.
See : opw-2411236
task-2389731
[IMP] web_grid: renderer in editmode while updating grid
This commit aims to keep the input value while the grid renderer is updating grid data's between grid adjustment and grid read_group.
Previous behaviour :
The previous value of the update cell is shown the time between the two rpc calls (adjust_grid, read_group) because the rendering is done just
after adjust_grid with editMode not set and the cell value not updated in the model rendered.
- User triggers _onUpdateValue by writing a new value (let's say : (new : 42, old : 0))
- The rendering is updated during the call to rpc in the grid_controller.js _adjust method.
-> As the state.editMode to render the web_grid.CellValue, the rendering is a div with the cell.value user, which is the previous state value : 0.
- The rendering is updated once again after the result of read_group => Cell value = new_value : 42.
Expected Behaviour :
Between the two rpc calls, the editMode is still true, which allows the web_grid.CellValue template to render an input cell with the currentInput value : 42.
The user get not troubled by the value changes and the behaviour is more smooth regarding UX.
Task-2389731