The "My department" filter in the "Time Off" overview menu is changed to also include the leaves of employees from child departments (all the way to the bottom of the hierarchy).
task-2699541
closesodoo/odoo#81597
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Prior to this commit, the _search_valid method returns all the time off types.
With this commit, only the time off types that have a valid allocation are returned
task-2711388
closesodoo/odoo#81724
X-original-commit: 20a2b29ee273c505f0279f128e8ac6c13c5be043
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Add default filters to the Allocations and Time Off smartbuttons on the time off type form.
This is done to avoid having numerous records with time and only show the relevant to approved and approved allocations as well as the time off for the current year.
task-2688122
closesodoo/odoo#79699
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Currently, in the overview page of timeoff, in gantt view all
records of the company are displayed. The purpose of this commit
is to improve the loading time by displaying less information
also remove "by employee and time off type" from reporting.
So in this commit, added a default filter "My Department" on
overview page and removed "by employee and time off type" from
the menu "reporting".
closesodoo/odoo#80542
Task-id: 2695774
X-original-commit: ede8331294ebd163af93c8c02eacfbffccfa97c6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose: It does not make much sense to create allocations of such an
Time Off Types that don't require allocation.
task - 2658250
closesodoo/odoo#80541
X-original-commit: 69cee9c13b1d5267b74a9f107bae85ea1c42aa38
Related: odoo/enterprise#22589
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Description of the issue/feature this PR addresses:
In hr_holidays, there is no information about the conflicting time off when a second time off is scheduled at the same time.
There is a validation error saying "You can not set 2 time off that overlaps on the same day for the same employee".
The validation error should display the conflicting time off
Current behavior before PR:
The validation error displays the following:
"You can not set 2 time off that overlaps on the same day for the same employee"
Desired behavior after PR is merged:
The validation error will display the following:
"You can not set 2 time off that overlaps on the same day for the same employee.
Existing time off: Mitchell Admin / Trip with Family : 24.00 hours / from 06/09/2021 to 08/09/2021 / To Approve"
task-2641682
closesodoo/odoo#76452
Related: odoo/enterprise#22490
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, picking a range of dates by clicking on
the end date field set the wrong date on the start date field.
This was because the option "related_end_date" was used
on the end date field instead of "related_start_date"
Replacing the "related_end_date" by "related_start_date"
on the end date field fixes the issue.
closesodoo/odoo#79997
X-original-commit: 8402e55e0db474ee64e641866d8c76302fb1ef4e
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
The domain on the allocation leave type was too restrictive for Time Off
Officer and they couldn't create allocations when the "Employee
Requests" of the Time Off Type was set to "no".
This commit allows the Time Off Officer to request those allocations
again.
closesodoo/odoo#80041
Taskid: 2694163
X-original-commit: d79af924a59f32a0b2dee9b10bb7c8cf388892df
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Current Behaviour :
Employee can request any type of leave.
Behaviour after the PR:
Employee are only shown leave that they can request.
opw-2684670
closesodoo/odoo#79502
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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.
closesodoo/odoo#76722
Taskid: 2643713
Related: odoo/upgrade#2843
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The name_get for leaves types would previously not show the number of
hours available to the user for the extra hours time off type.
This commit adds that special case of time off type.
This commit also improves the leave_type name_get overall, by allowing
the hours to be display upon initial loading when requesting new
leaves/allocations properly.
Thanks to this change we do not need to display the number of extra
hours available at all time in the form views.
TaskId-2655689
Part-of: odoo/odoo#77841
A time off for multiple employees was not showing who the employees were
in the list view.
Now it shows the avatar of all employees in the list view.
closesodoo/odoo#78758
Taskid: 2674062
Signed-off-by: Kevin Baptiste <kba@odoo.com>
General fixes for usability
- Time off type configuration visual : https://tinyurl.com/yj2z6okp
- When you create an allocation, the end date should have a place holder "no limit". If there is no end date recorded, that value should be displayed on loading.
- In Overview, remove filter "people i manage"
- In Approvals / time off : change filters : https://i.imgur.com/uDNjZv8.png
- In Approvals / approvals : change filters like in point 5 (remove people I manage replace with my team)
- In Reporting / By Employee : filters : https://tinyurl.com/yg3u3rkf
- In Reporting / By Type : filters : https://tinyurl.com/yhbpgz5m
- Remove Allocations smartbutton from Employee App
- When you click on TimeOff Smartbutton from Employee App, you should be redirect to this screen : https://tinyurl.com/ygwxzx5b
- When an allocation is created, the validity is added to the name of the allocation like "Allocation X (validity Date --> Date) and hide the validity field in "My allocations".
- Users will have the information of the validity from the name of the allocation
task-2643692
closesodoo/odoo#77376
X-original-commit: 7f92c830d3607167bd76bc43d992fbf720a3ef29
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Since odoo/odoo#35700 department_id is not a searchable field in the
employee search view as it has been added in the searchpanel. Since
then, the view from department > absence has been broken since it was
not filtering on the department anymore.
This commit fixes that behaviour by defaulting to the department in the
searchpanel instead.
TaskId-2648380
closesodoo/odoo#77157
X-original-commit: 9200742a1bde75ec2de02b9d11f67dc77538d79d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The stat buttons were showing incorrect values, the accrual action was
not returning, archiving an employee was no longer possible because an
incorrect state was used.
closesodoo/odoo#76468
Taskid: 2641596
X-original-commit: cc75a1233ed40cb1a4812a5f4a377b8859795b26
Signed-off-by: Kevin Baptiste <kba@odoo.com>
- Hide transition mode if there is 0 or 1 level on accrual plan;
- Fix kanban card
- Reduce bottom padding on calendar view
- Log a message when an allocation linked to accrual runs for the first
time
closesodoo/odoo#75940
Taskid: 2636417
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
We clean various graph archs taking into consideration that:
- the default type of a graph is "bar".
- a bar chart is by default stacked.
- the field attributes type="row" and type="col" does not make sense for
a graph view (since its implementation was separated from the pivot
implementation a long time ago))
- the boolean attributes should now take 1 or 0 as value (but the other
values are accepted for retrocompatibility).
Part-of: odoo/odoo#76065
Fixes the above mentioned field in the hierarchical kanban view in the
accrual plan form view.
TaskId-2637152
closesodoo/odoo#75923
Related: odoo/upgrade#2802
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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
closesodoo/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>
Following the removal of read access on ir.model (odoo/odoo#69120),
the mail.activity.type model was not accessible to non-admin users due
to the res_model_id many2one field.
Before this commit, a project user could not access the Activity Type
menu.
Convert it to a selection field with the selection values being
computed in sudo.
closesodoo/odoo#74981
Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Steps to reproduce the bug:
Go to your computer's date settings
Change region, e.g: (US or choose a region with a negative UTC)
Go to the preferences settings in odoo > Change the timezone to US too
Go to Time Off app > Manager > Allocations > Create a new one
Allocation type : "Accrual Allocation"
Set the end date to, e.g: "04/07/2021"
save
Problem:
The end date moves back by one day.
The field " date_to " is of ”datetime” type, so we use in the view "widget="date"
Therefore, the user can only choose the date. We save the time in the database at" 00: 00:00 ".
But as we use in the view "widget="date", after saving the record,
the datetime will be converted to a date, based on the user's UTC.
For example, in our case:
in database, date_to = "2021-07-04 00:00:00"
user UTC = "UTC-6"
result = "2021-07-04 00:00:00" - 06:00:00 → "2021-07-03 00:18:00"
Solution:
Remove the widget date to allow a user entering the full date (eg: 2021-07-04 23:00:00), that
will be stored correctly in UTC afterwards, instead of having the widget making the date switch to
another day.
opw-2607082
closesodoo/odoo#75218
X-original-commit: 2ddabf087004e14ac77aa397eb345d750026dd20
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Define `data-hotkey` on most used action buttons.
For the modals, the following keys are dedicated for "special"
actions:
- Alt+G: add
- Alt+V: save
- Alt+Z: cancel
closesodoo/odoo#73275
Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Previously the domain in the view for the leave request didn't check for
the time off type validity, this fix aims to remove that possibility.
Also prevents from selecting expired time off types in allocation
requests.
Task ID: 2578150
closesodoo/odoo#72653
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This module allows an employee to create leave requests or allocation
requests from their overtime.
Depending on the configuration of the leave type, the request can be
made from:
- "My Profile" for allocation which allows employee requests;
- Time Off dashboard for leave type with no allocations;
- The employee profile for the time off manager.
TaskID: 1904850
[IMP] hr_holidays{,_attendance}: leave allocation multi create
Change leave allocation create function to a multi create one.
Task ID: 1904850
Before this commit, suppose we have a scenario like below
Task-A:
Activity-1:
name: Email ( Today )
Assigned to: User-1
Task-B:
Activity-1:
name: Email ( Today )
assigned to: User-2
Activity-2:
name: Call ( Due in 3 Days )
assigned to: User-1
When User-1 goes through the systray 'Today' filter shortcut he gets both
Task-A and Task-B in the list instead of only Task-A. Indeed currently
activities are not filtered based on current user with its deadlines.
However purpose of systray is to indicate activities current user has to
perform instead of global activities.
After this commit activities will be filtered based on deadlines as well as the
current user. In order to achieve this behavior we needed to pass a domain like
[
('activity_ids.date_deadline','=', fields.Date.today()),
('activity_ids.user_id','=', 1)
]
And for that purpose we introduced a non-stored compute field with a search
method.
Task ID-2438822
COM PR odoo/odoo#72219
X-original-commit: f4eaf4d8fb2f97240201104dcd4fc7e2674bce02
Currently, it's possible to add supporting documents on the chatter of
the time off. But it's not easy to use and doesn't make really sense.
So we will add the possibility to add it more easily.
So in this commit,
- Added 'Supporting Document' on Time Off type to support the
attachment based on types.
- On new Time Off, if the Time Off type has a support document then allow
uploading the supporting document in form view.
- The File is recorded on the chatter of the Time Off request.
- There will be synchronization between chatter and form attahcments.
PS: added non-stored m2m field to display the attachment view(m2m_binary)
in the form view as o2m does not support it.
TaskID: 2431478
Currently, to identify records based on state, in most of the list views we
use 'badge' widget on 'state' fields which can be decorated as needed.
However, for the list views, best approach would be to also add list
decoration along with 'badge' widget so that the whole line is colored
and it's easy for user to 'scan' the information
This commit improves the behavior adding decorations to several list-views.
To check the list of changes, kindly see the task specification
Apart from that, this commit also improves label of the module state from
'Not Installed' to 'Uninstalled'.
TaskID-2527119
closesodoo/odoo#71367
Related: odoo/enterprise#18587
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.
Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient
Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.
closesodoo/odoo#69819
Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
Social Marketing app is 25 menu away from Email Marketing, etc.
So, all menus should be reordered.
- This commit will reorder the menus of the app switcher in order to reduce
the distance between correlated applications,
and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.
PR: #69984
TASK ID: 2513082
Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Remove 'refuse' leaves from the Calendar View.
Improve leave/leave.allocation popup form views.
Add Sequence handle to leave type list view.
Change the sorted key func. in _search override to
first order by sequence asc then sort ties by
remaining,taken desc.
closesodoo/odoo#62162
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, When we load the Year view of the calendar then
the view is not properly scrolled top due to padding at the
top.
Calendar is scrolled to the current month but due to top
padding in year view it was not scrolled top when initially it
was loaded.
So in this commit, remove the top padding and use padding on month
so it will not have initial scroll when scroll to the particular month.
Set default calendar view to 'month'.
closesodoo/odoo#66811
Taskid: 2428655
X-original-commit: adbade3c1a000c476644e616d66af5cb982249cf
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose of the task is to improve mobile interface of the Time Off
and calendar view.
So in this commit, we have improved UI as below:
hr_holidays:
- Move the leave summary topbar from top to sidebar filter of
calendar for small screen
- Improve the kanban view of leave for mobile and added the
badge for state.
web:
- Improve the calendar year mobile view by spliting the month view
in 2 column.
TaskID: 2333778
Related PR: https://github.com/odoo/enterprise/pull/13454closesodoo/odoo#61474
Related: odoo/enterprise#13454
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The work location of an employee was previously a fields.Char. That was
changed to a Many2one field to a the new model called work.location.
That had some consequences in other modules that had to be slightly
adjusted. The modules impacted were hr, hr_appraisal, hr_payroll.
Task id: 2335646
closesodoo/odoo#63192
Related: odoo/enterprise#15235
Related: odoo/upgrade#2020
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, when we create time off and does not add 'Start Date' or
'End Date', it displays a wrong warning.
Issue is occur because date_from is required field at db level and it's
value computed based on visible field request_date_from which is
non-required field and when you keep that empty it will raisse the
contraint instead of required error.
So in this commit, we make request_date_field field required from view
and also make request_date_to visible based on condition so it should
fill the proper value inside the date_from and date_to.
closesodoo/odoo#63222
Taskid: 2352360
X-original-commit: c54f445ceae72518f787f43213ec78a9a7e1b1eb
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
A new calendar view has been added, the "year" view.
Some modifications should be done on this view, more specialy in "Time Off" application.
Problems were the fact that it was hard to see if a time off has been approved or not.
Another was the fact that week-ends & public holidays were not grey.
This commit change year calendar in Time Off module.
More specially, this commit:
- Change default calendar in personal dashboard to "year"
- Gray week-ends & public holiday (based on the worker's calendar)
- Hatch non-approved time off
- Removed a calendar view from My Time Off Requests
- Fix a "cancel" button that doesn't work
- Add a new view that is displayed when there is no filter to show on the filter view for calendars
Task id #2318645
Task id #2317525
Problem
-------
For regular allocation that have an empty date_from
(Allocation existing before 14.0),
it's not possible to save any change since an invisible field is required
and cannot be set.
Solution
--------
The field date from should be only required for type accrual
closesodoo/odoo#61892
X-original-commit: 700e584dd22fb7bc845675b4a49a3e5a85a7253a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
WHY: it's a copy-paste mistake and doesn't have any meaning, while makes code
less readable
closesodoo/odoo#61091
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Issue
- Install "Time Off"
- Create new time off and approve it
We can no longer refuse it
Cause
The refuse button is invisible if the status is not equal to 'validate', in this case it is equal to 'validate1'
Solution
Change the attrs to display the refuse button when the status is 'validate1'
opw-2361929
closesodoo/odoo#61079
X-original-commit: 80926f582d88aae359a6b35ea521026a3804ce00
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>