This commit adds slight improvement to the design of remote work
by adding margin to "Set Location" button.
task-3693392
closesodoo/odoo#157502
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Versions
--------
- 17.0
- saas-17.1
Steps
-----
1. Have `calendar` and `hr_homeworking` installed;
2. go to Calendar;
3. try to set a location by clicking on a date column.
Issue
-----
Odoo Client Error.
Cause
-----
The `onDayRender` function calls `onDateClick` to create a record,
passing an `info` object lacking the `jsEvent` attribute.
Solution
--------
Use `this.props.createRecord` instead.
closesodoo/odoo#159060
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
The homeworking popover was not working with the `#scheduling_box` on
mobile, the latter covering the buttons of the popover.
To solve this, we replace the popover by a dialog on mobile.
task-3630139
part of task-3575827
closesodoo/odoo#145446
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Since the early versions of the homeworking modules, we were showing incorrect
colors for the homeworking icons if the partner_id was too large. This comes
from the fact that we were not using the getColor helper from calendar
to decide which color to render. Since we have a limited amount of colors,
we should not use the partner id to define the color, but actually cycle
through all the possible colors, which is done by the getColor method.
Also, when getting the homeworking data, it was possible to get partner_id as
false when the employee had no related user. This commit also changes this to
fallback on the work_contact_id if no user is set.
task-3561678
closesodoo/odoo#139167
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
This commit changes the default worklocation set for the employee from "office"
to false. Also, this commit adds the possibility to delete a default
worklocation from the calendar view.
A typo is also fixed from "exception" to "exceptions" which was causing a bug
returning the worklocations.
task-3584193
closesodoo/odoo#141209
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
In homeworking, we currently show the work location as false if a location is
not set. This commit fixes this issue by checking if the location is set before
rendering.
task-3570053
Part-of: odoo/odoo#139736
https://github.com/odoo/odoo/pull/138670 changed how the set location buttons
look, however this change started causing the button not to be clickable. This
commit fixes this issue. Also we change the button text from "add location" to
"set location". On top of that, the "set location" button takes too much space,
creating a big gap between the date and the events for that day. To make the
gap smaller, we reduced the size of the button.
task-3570053
Part-of: odoo/odoo#139736
* = hr, hr_holidays, hr_homeworking
Changes the hover on plane icon for leave. In public employee the hover is : "on leave" and in private employee the hover is the name of type's leave
task : 3527398
closesodoo/odoo#137741
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Co-authored-by: Xavier Bol <xbo@odoo.com>
The attendance dropdown is a switch button and "Needs Action" is no
longer visible on the popover (instead none of the buttons are selected)
The popovers are larger and the icons aligned. Their headers are the
color of their event.
The year view's event links inside the popovers have the same styling
as their event in the calendar.
task-3389317
Part-of: odoo/odoo#138670
In some modules at Odoo we want to have custom headers for calendar. Since
fullcalendar accepts a function callback that should render the header, it was
decided to have this method exist in the calendar_common_renderer. So any
other apps that want to add something to the header, can just extend this
method. This commit also changes how homeworking changes the header so that it
complies with this change.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
Before this commit, when the locale was not in english, the following
traceback was observed:
```
Uncaught (in promise) Error: The following error occurred in onWillStart: "res[employeeId][((intermediate value) + "_location_id")] is undefined"
OwlError owl.js:87
wrapError owl.js:2604
onWillStart owl.js:2647
useModelWithSampleData model.js:165
setup calendar_controller.js:48
setup attendee_calendar_controller.js:10
setup appointment_calendar_controller.js:15
setup google_calendar_controller.js:11
setup hr_homeworking_calendar_controller.js:12
setup microsoft_calendar_controller.js:11
```
closesodoo/odoo#139052
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
https://github.com/odoo/odoo/pull/137502 changed how we handle homeworking
records. However, it would throw a traceback if luxon was using any non
english localizations to get the week name of a date. This commit fixes this by
setting the us location before getting the weekname as we rely on it to get the
default data for that day.
closesodoo/odoo#138831
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the hr presence status icon is hardcoded in
each view in which the icon is needed.
This commit creates a widget for that icon to be able to use that
widget in the views in which the icon is needed to avoid duplicating
the code.
task-3376776
This commit changes how hr_homeworking deals with hr.employee.homework records.
Before this, an hr.employee.homework record was created for each day of the
week, even if it was the default location of the employee. This commit reworks
how homeworking deals with them to reduce the amount of records generated.
Now default employee locations don't generate records. They are rendered in the
calendar view as ghost events. For exceptions, we allow only creating a single
exception per day. If an employee sets an exception as 'weekly', it sets that
location as the default one for the employee on that day of the week. Not
having to deal with recurrencies makes the homeworking code simpler to manage
as well. Also exceptions are, by definition, not common. So we shouldn't expect
a lot of exception records to be created.
task-3527196
Part-of: odoo/odoo#137502
luxon and moment are both used in the solution, but these two libraries
facilitate the manipulation of dates. It was decided to replace all uses of
moment with luxon so we can then remove moment.js from the code and lighten
the assets.
task-3391739
closesodoo/odoo#133144
Related: odoo/enterprise#46447
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :
<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>
task-3292454
closesodoo/odoo#131390
Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.
Part of task~3443861
Part-of: odoo/odoo#130467
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.
task 3410198
[1]: 19ea1ac08043e22a811630968e44715cc3bfc495
Part-of: odoo/odoo#125716
Users and employees can now define their usual worklocation
for a day of the week aswell as define unusual ones from the
calendar app. The worklocation is then displayed in the calendar
in two different ways: when only one person is selected, there
is a circle with an icon in it, and a ray that extends to the right
if the person is at the same location for multiple days. If there
are multiple persons selected there is no ray, instead the circles
are grouped by location type and colored accordingly to the filters
in the left panel.
closesodoo/odoo#129585
Task: 3060685
X-original-commit: c74ac3f698d4ea4c9b7a5e060fba4cf77cc9a6d7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Co-authored-by: dasz <dasz@odoo.com>