Before this Commit, dates was not formatted based on user's language.
With this commit, we use format_date to correctly format dates.
closesodoo/odoo#108442
X-original-commit: 4da7129695f2619711f08ed7c36a37543deaa31d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Only show the stress-days of the enabled companies.
task-3098721
closesodoo/odoo#108277
X-original-commit: 7fb96b24fd8ec65b58c43d223dc63c0068b6269a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Due to a recent change, the time off dashboard was not properly updated
when a leave was created/deleted/canceled.
task-3097259
Part-of: odoo/odoo#108275
Context:
In some companies, we want to give employees a day off.
Unfortunately, their working hours do not correspond to those of the company.
To remedy this, we set the work hours at: 00:00 until 23:59.
Steps to reproduce:
- set work hours to 00:00 until 23h59;
- give one day off to a department;
- view statistics on a employee (who belongs to the department).
Issue:
We notice that in the statistics, the dates are wrong.
Indeed, it is indicated that the leave is over two days.
Cause:
When we receive the dates via the rpc call to display them, they are character strings.
The browser interprets them with the computer's timezone (even if it is UTC).
The hours of work being at the limit of the day, we overflow on a second day.
Solution:
As we know that the timezone used to store dates in the database is UTC, we can calculate an offset and apply it before displaying the result.
opw-3063177
closesodoo/odoo#107614
X-original-commit: 31dda867957c8083177f7e2776fa461786c2bff3
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Validating an employee's leave with multiple companies selected doesn't
work when the employee isn't part of one of the selected companies
Steps to reproduce:
1. Install Time Off
2. Go to General Settings > Companies and create another company
3. Connect as Marc Demo, open Time Off and create a new time off request
4. Connect as Mitchell Admin and go to Time Off > Managers > Time Off
5. Approve and validate the time off request of Marc Demo
6. An access error is raised: `Access to unauthorized or invalid
companies.`
Solution:
Clear `allowed_company_ids` from the context when we create the
`calendar.event` to avoid raising the error
Problem:
The creation of the `calendar.event` didn't use the correct user's
`allowed_company_ids` in the context
opw-3052973
closesodoo/odoo#107415
X-original-commit: a5ab773378f5ba2241793c536cf141d27d250ae5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
The previous tooltip was a bit confusing, replace it with a better
one.
closesodoo/odoo#107170
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Co-authored-by: Fabrice Henrion <fhe@odoo.com>
Purpose: In order to reduce the possibility to make errors, make the end
date of the validity period always come after the start date.
task - 3069666
closesodoo/odoo#106966
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The default hours of a time off created from the Day view would be the
range of hours that was selected in the calendar view, thus resulting in
leaves of half an hour.
closesodoo/odoo#106719
X-original-commit: 1ea102d4a2d62308c6dfaa7c3a71fdc4c6c4db85
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The goal of this revision is to add a group
`mail.group_mail_notification_type_inbox` which is granted
automatically when the user `notification_type` is set to `Inbox`
to be able to easily hide the filter `Unread messages` when
the user uses the `Email` notification type,
by simply adding `groups="mail.group_mail_notification_type_inbox"`
on the filter rather than overriding `_get_view` in every model.
The code overriding `_get_view` of `project.task`
to hide the filter "Unread messages" replaced
in this revision initially comes from
odoo/odoo@da868d28e2
> - In project.task search View:
> - the filter for unread messages should be visible only if the current user
> managing his notifications in Odoo
The above revision was part of the task 2844212
closesodoo/odoo#104328
Related: odoo/enterprise#33338
Related: odoo/upgrade#3996
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
In hr_holidays, when the time off type has the following settings:
- Requires allocation: Yes
- Employee Requests: Not allowed
An allocation created with this time off type still requires to be validated.
This commit removes the need to validate an allocation created with the time off type described above.
task-3004313
closesodoo/odoo#106337
X-original-commit: c98e1280aee2f31e6dbf3f52dac47cf020c628d2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, creating a new leave as an officer
from the approval tab would have by default no time off type,
resulting in "Employee on False" in the display_name.
After this commit, the display_name will set "on Time Off"
instead of "on False" when there is no Time Off Type set.
task-3054318
closesodoo/odoo#104963
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Steps to reproduce:
- logged in as user with admin or officer permissions;
- create time off request with config for sick time off request;
- try to delete partially approved time off request from calendar view by pressing delete button.
(The button is in the window that opens when you select a time off)
Issue:
Partially approved time off request are not deleted when using delete button in calendar view.
(It can only be deleted via the list view)
Cause:
The function which deletes the element is not called.
opw-3061570
closesodoo/odoo#106023
X-original-commit: b9d01d30474303747f65376b0abf4cde3d2400e7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Introduce the '@mail/model' module that gathers all the stuff involved
in model definitions. This allows us to reduce the number of imports.
* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
website, website_livechat, website_slides
Task-3056971
Part-of: odoo/odoo#105096
*: hr_holidays, im_livechat, snailmail, website_livechat
Clean template of discuss component templates, so that they
are more appropriately compact, which makes it easier to
read the layout at a glance.
Task-3055780
Part-of: odoo/odoo#105099
This commit simplifies discuss template by putting record accessors
in the context of template.
*: calendar, hr_holidays, im_livechat, sms, snailmail,
website_livechat
Task-3055022
Part-of: odoo/odoo#105099
Unlinking a model during uninstallation can potentially fail when the query
removing any related mail activity types fails. This happens when such a record
is still referenced in the mail_activity table. Explicitly removing related
mail activities (as is done for the activity types and other related mail data)
resolves the issue.
Two tests are added, one that demonstrates the general flow and a regression
test triggering the behavior that caused a bug in the uninstall procedure of
the hr_holidays module.
closesodoo/odoo#104152
X-original-commit: b315f7f562fc84a09d99d6e7676567eb6f285402
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: De Caluwé Tom (tdc) <tdc@odoo.com>
At this time, the responsible for a time off type can be a user related
to another company. With this commit, this is no longer possible.
In order to do this (and to fix the existing bug that the domain on the
responsible_id field was overwritten by the domain specified on the
form view), the domain on the form view was moved to the responsible_id
field itself.
task-2981972
closesodoo/odoo#100381
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit adapts the color of icons in the Time Off Type section for
the dark mode.
task-2710677
X-original-commit: a5f108c5b9ea1008e2c5b519902bbf6398b02233
Part-of: odoo/odoo#103162
When printing the Time Off pdf report for Time Off summary from the employee form, the colors
of the Time Off are not related to the Time Off type but are defined as red by default and assigned
another color in the demo data.
This commit maps the colors of the Time Off Type to the colors available in the Chart.js library
task-2963752
closesodoo/odoo#99804
Related: odoo/enterprise#31154
Related: odoo/upgrade#3894
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Prior to this fix, closest_allocation_to_expire was the upcoming allocation regardless
whether there were remaining leaves on it or not.
That lead to misleading information on the dashboard.
For example, let's say user has two allocations and used up the first allocation
and has X days left on the second allocation. Still, the user will see that they have
left X days (Valid until -- the first allocation expiration date --). Which is misleading,
Instead they should see X days (Valid until -- the second allocation expiration date --).
task - 2978789
closesodoo/odoo#103813
X-original-commit: dee3552659bec78fbbce4e8af155b3259e721dbd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, creating a leave for multiple employees
from the manager's page allowed to create leaves regardless
of the concerned employee's allocations.
After this commit, an error message will be displayed to inform
which employee cannot take that leave.
Also removes unused imports.
task-2995120
closesodoo/odoo#103733
X-original-commit: 636a8276e6797c1d8fe43da61d2fd26b558bfa45
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Fix the hatching and striking effects for events
by moving some scss rules to the right place:
- o_event_hatched
- o_event_striked
Various fixes for the calendar popovers to display properly, such as:
- year scale popovers
- proper popover body padding and font-size
- style that depends on attendee status
- other scales popovers
- inverse the condition when the popover footer must shrink
closesodoo/odoo#103661
X-original-commit: 917d8e4123517c73d8bd6a4bd83becf1b0ee1090
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Purpose
=======
In the case a time off is created:
- In the past
- Using support documents
An invalid user error is raised in the interface, because the webclient
is sending values for the field 'supported_attachment_ids' (Example: [(6, 0, [])])
which is writing by inverse relationship on the field 'attachment_ids'.
On the other hand, it should be possible for an employee to add attachment
on the time off after it has begun.
closesodoo/odoo#103626
Taskid: 3032232
X-original-commit: c32c22ec267626322aebb7af4ee36b573c71760d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Instead of having a dedicated module for all-things dark mode related,
this commit moves the (S)CSS files into their respecting modules and
uses `web` and `web_enterprise` to provide the base infrastructure for
the dark mode (cf. dedicated assets bundle).
Note:
Don't forget that you have to handle 2 cases:
1: SCSS variables must be placed BEFORE bright ones
2: CSS variables must be placed AFTER
task-2710677
Part-of: odoo/odoo#102868
One should be able to delete time off from the calendar view in validate
and refuse states.
task - 2857233
closesodoo/odoo#102938
X-original-commit: d8d4f2d39658c1a2dc24510e9e3f0bf75f590663
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Go on Timeoff > Configuration > Accrual Plans
Before this commit, when no rules were set, there was no visual feedback.
This was because that feedback only appeared when the form view was in readonly,
which is virtually never the case now because of the always edit feature.
After this commit, there is the relevant visual message if no rule is set.
X-original-commit: 599554adc3883fa2742764d8f948258dee2ef89e
Part-of: odoo/odoo#102578
This PR adapts the form views since the merge of #100570.
task-3002537
closesodoo/odoo#102467
X-original-commit: de72d27ea121c1944d7a3d3e5996ce08473d3b09
Signed-off-by: Kevin Baptiste <kba@odoo.com>
*: bus, calendar, hr_holidays, im_livechat, note, rating, snailmail,
website_livechat.
The mail mock server is getting bigger and bigger. As a consequence,
navigating/keeping it up to date is quiet inconvenient.
This commit solves this issue by splitting it by model/controller.
closesodoo/odoo#98374
Related: odoo/enterprise#32314
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The `<span>` was not properly closed.
closesodoo/odoo#102162
X-original-commit: cb3b87f8fe66d11e1a96066a27eb3ef979bc3e39
Signed-off-by: Kevin Baptiste <kba@odoo.com>
If you create stress days, the default work calendar is set to be
the company's default calendar, therefore exclude by default
every employee with a different work calendar. Since the field
is by default hidden, it is misleading, so by default no calendar
should be set.
task-2999197
closesodoo/odoo#101986
X-original-commit: 911832980786cc10bb79c7b36b2142d063917bff
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Model patches are now defined using the `registerPatch` function. This
function takes an object as argument which keys match those of a model
definition.
Benefits:
+ More consistent shape between model definitions and patch definitions
+ No need to import one function to each type of patch
+ No need to repeat the model name for each type of patch
+ No need to import the original definition
Task-2998282.
* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
website_livechat, website_slides
closesodoo/odoo#101827
X-original-commit: 7d23491b44b7372209057ea2abc565a95710b316
Related: odoo/enterprise#32136
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
The widget was squeezed and not taking the whole width it was supposed
to.
closesodoo/odoo#101830
X-original-commit: f57a5cce1e50aaaadcede3e5165df9cc999323d0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When selecting multiple employees, the time off type was not
automatically reset and would show time off types not available (due to
missing allocations) to some of the employees.
task-3002165
closesodoo/odoo#101829
X-original-commit: fbafe1992865a8ba492cc43bab17ae68df9eb994
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Fix styling of form view after merge of form-always-edit.
closesodoo/odoo#101506
X-original-commit: 2cb4797d66b128c982e005a2b46f9347eecac5da
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit does multiple things:
- The readonly mode of form view is removed but not for the fields.
it means that the fields in the view are always in edit mode except
if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now
the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save
button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when
hovering the status text in control panel.
task id: 2822553
X-original-commit: 77824ad44b6945a9811120380747f87ef6362ae2
Part-of: odoo/odoo#101118
Co-authored-by: luvi <luvi@odoo.com>
This commit introduces the new calendar view written in owl.
closesodoo/odoo#101185
X-original-commit: e88988f58582d5b49a32d7102a74a176f40c4c69
Related: odoo/enterprise#31808
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
With the change to 'always edit' on form views by default, several
'oe_read_only' fields had to be modified to play nice with the fact
that in most cases, there is no read_only mode
closesodoo/odoo#101188
X-original-commit: 868992abeeda983768323e1126b5643eff8fdb33
Related: odoo/enterprise#31810
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Since #97888 it was possible to request a leave during a stress day that
covered multiple day due to a typo in the logic.
task-2995191
closesodoo/odoo#101171
X-original-commit: 7fdb1a9980adeb5fded58b6715c3c6a5b66099ed
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The method `_clean_leave_responsible_users` is also called from the
write method in hr.employee, however not anyone can remove users from
groups.
Fix of the fix in odoo/odoo#100591closesodoo/odoo#100923
X-original-commit: 129e4799b04210f107185ba96b5c1845d943cf8b
Signed-off-by: Kevin Baptiste <kba@odoo.com>