Commit Graph
107 Commits
Author SHA1 Message Date
Gabriel de Paula Felix (gdpf) 69d23262f8 [IMP] microsoft_calendar: Credentials module and don't sync old events
Before this commit, when the first synchronization with Outlook Calendar was done or when the synchronization was restarted, all events previously created in Odoo (before synchronizing) were being synced with Outlook, triggering lots of emails and notifications for attendees. Additionaly, all microsoft credentials information were concentrated within the res_users file, difficulting updates in this file.

After this commit, only events created or updated after the synchronization starts (or restarts) are synced with Outlook Calendar, with 5 minutes of time acceptance for avoiding network delay issues. Moreover, a Microsoft Credentials module was added for gathering microsoft credentials in one place.

closes odoo/odoo#128150

Task-id: 3410651
Related: odoo/upgrade#5047
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-09-12 20:52:14 +00:00
Gabriel de Paula Felix (gdpf) a14bc16647 [FIX] microsoft_calendar: traceback trying to delete recurrence
Before this commit, trying to delete a recurrent event that was already synced with Google Calendar or Microsoft Calendar was raising a traceback and not showing the User Error which forbids this action to be done.

After this commit, the traceback is not shown anymore and the User Error is correctly presented to the user while trying to delete a recurrent event (with Microsoft synchronization active).

Traceback snippet:

result = _call_kw_multi(method, model, args, kwargs)
File '/data/build/odoo/odoo/api.py', line 448, in _call_kw_multi
  result = method(recs, *args, **kwargs)
File '/data/build/odoo/addons/microsoft_calendar/models/calendar.py', line 168, in action_mass_archive
  if self._check_microsoft_sync_status() and any(self.microsoft_id):
TypeError: 'bool' object is not iterable

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error

closes odoo/odoo#134293

Issue: 3468190
Task-id: 3473180
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2023-09-06 05:53:42 +00:00
Gabriel de Paula Felix (gdpf) 07f17b0c80 [FIX] microsoft_calendar: traceback restarting synchronizations
Before this commit, when restarting a synchronization with Outlook or Google, a traceback error could be thrown due when accessing a variable possibly null. After this commit, the variable integrity is checked before its access.

Issue from: 3473180

closes odoo/odoo#134181

X-original-commit: e7015b6c0cd2bd009184bfbc69730c211922658b
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2023-09-04 19:58:31 +00:00
Arnaud Joset c111b9ac44 [FIX] microsoft_calendar: allow resetting account with option deletion
Before this commit, when the microsoft sync was reset with the following options:
- Delete from the current Microsoft Calendar account
- Delete from both

An rpc error was encountered:

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url:
https://graph.microsoft.com/v1.0/me/calendar/events/<event_id>

After this commit, the local events are deleted if necessary and
the non-recurring events are deleted on microsoft. We keep the
recurring one to be consistant with
https://github.com/odoo/odoo/commit/29ce2f0451c140cd16ecc26a51260661ede410bc

closes odoo/odoo#133051

Taskid: 3437386
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-31 09:04:54 +00:00
Pierre Pulinckx (pipu) b7e07135c6 [FIX] *: fix missed replacments env._t by _t
Related to previous commit c07181b20b,
this commit fixed missed remplacments of this.env._t by _t, also
replace one occurence of _lt (not exist anymore) and replace remainings
core._t.

closes odoo/odoo#133503

Related: odoo/enterprise#46496
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-30 08:08:45 +00:00
Pedram (PEBR) 13656c71c3 [FIX] *_calendar: neuter Google & Microsoft Calendar
This addresses an issue with the current Google and Microsoft
Calendar synchronization feature in Odoo. It aims to prevent
inadvertent modifications on calendars in a duplicate database.

opw-3382489

closes odoo/odoo#132698

X-original-commit: 9c94804893cf41eb91aaa8750bf2d9a59f513158
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-22 20:00:57 +02:00
Gabriel de Paula Felix (gdpf) a395277fed [IMP] microsoft_calendar: add synchronization pause button and tests
Configuration and tests added for 'pause synchronization' button (Outlook module).

closes odoo/odoo#126560

Task-id: 3290898
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-21 12:38:44 +02:00
Pierre Pulinckx (pipu) c07181b20b [REF] *: Replace env._t() by _t()
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

closes odoo/odoo#131390

Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-18 19:17:16 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Kartik Chavda efac5707d1 [REM] calendar: remove attendee_status field
Purpose of this commit to remove `attendee_status` field
which was only usefull in one place where it can be easily
replacable and also this field contains some heavy
computation and added in calendar view which might be
cause some perfomance issues.

So, in this commit remove `attendee_status` field and its
related code and replace it be alternative which gives
desire output as before.

task-3390334

Part-of: odoo/odoo#126768
2023-08-16 16:04:26 +02:00
Gabriel de Paula Felix (gdpf) 29ce2f0451 [FIX] microsoft_calendar: no sync for recurrent events
Before this commit, updating recurring events was troublesome due to an Outlook limitation, which was sending spam to attendees. After this commit, when updating recurring events, it is suggested for users to update recurrences directly in Outlook Calendar to handle this limitation. It is not allowed anymore creating recurrences in Odoo when the sync with Outlook is active (although recurrences created in Outlook are still synchronized in Odoo). Recurrent events that were created before the synchronization start (which are not synced) can still be deleted in Odoo (then a suggestion of recreating them in Outlook is shown).

Previous unit tests regarding the synchronization of recurrences from Odoo to Outlook were deactivated. New tests were added asserting the forbiddance of this recurrence creation and update flow.

closes odoo/odoo#131806

Task-id: 3204905
X-original-commit: 27ee51029c1d4e9164b9705306b59b26598bcf7e
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2023-08-11 22:50:24 +02:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
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
2023-08-11 14:32:30 +02:00
Michael (mcm) 9d6b380a24 [REF] *: adapt patches after new patch function
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
2023-08-02 17:29:05 +02:00
Elisabeth Dickinson 41c9bccf6e [FIX] web, *: fix buttons squashing and spacing
*: calendar, google_calendar, microsoft_calendar;

task-3410165
part of task-3326263

X-original-commit: b680a6ac5769bf8e02921a9548792c7696992955
Part-of: odoo/odoo#129568
2023-07-26 09:22:07 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Xavier-Do 402e5d0acb [FIX] microsoft_calendar: remove unused _from_uids
Part-of: odoo/odoo#119813
2023-07-18 11:42:26 +02:00
Gabriel de Paula Felix (gdpf) 9b5070576e [IMP] microsoft_calendar: test checking single recurrent event deletion
Added a test asserting the correct functionality of single events deletion.

closes odoo/odoo#127980

X-original-commit: d93d564022bcdafece33f11f578013420b106b64
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-17 18:13:16 +02:00
pedrambiria 033f0f915e [FIX] microsoft_calendar: delete events correctly when reseting account
Before this commit, if you reset your microsoft callendar account and
set to remove events from Odoo, it won't remove them. The problem is
that the ('ms_universal_event_id', '!=', False) condition is not
implemented, and it can't remove the existing events.

opw-3382445

closes odoo/odoo#126739

X-original-commit: c4d8530c51e48e1f7c264b2b0c1efdab8d1fe0e6
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-28 23:02:37 +02:00
pedrambiria dc91f30008 [FIX] microsoft_calendar: keep sync_stopped status
Before this commit, if you stopped sync with microsoft, and
refereshed the calendar, it would change the button back to
synced status.

opw-3382311

closes odoo/odoo#126706

X-original-commit: 1e0e4e8a792513ddecc27ab42d76be0c5873c8bc
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-28 19:08:54 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Damien Bouvy 9894d6aa5d [FIX] google_calendar, microsoft_calendar: view issue
X-original-commit: 229d9bafc238d7eb4f3fb79622558ec52123996a
Part-of: odoo/odoo#122111
2023-05-23 22:32:45 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
stefanorigano (SRI) 46b762a1f1 [REF] web, *: milk colors
*: google_calendar, hr_holidays, hr_skills_slides, mail,
microsoft_calendar, point_of_sale, web_editor, website_livechat,
website_sale

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
Louis Wicket (wil) 9afe7c74c9 [IMP] *: remove "French spacing" 👺
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Fabien Pinckaers a1c447bf84 [IMP] google/microsoft_calendar: remove unnecessary CSS (better look without)
closes odoo/odoo#115061

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2023-03-13 14:20:24 +01:00
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00
pedrambiria 60845c8d73 [FIX] microsoft_calendar: prevent spamming after syncing the 2nd user
Before this commit: If the Odoo database is shared amongst multiple
users, and another user wants to sync their Outlook calendar with Odoo
Calendar, Outlook will again pull the existing Odoo Calendar events
during the sync and treat them as new events, causing Outlook to send
email invitations to all event attendees.

Steps to reproduce the issue:
 1. Create two users in Odoo
 2. Create two outlook accounts
 3. Change the email of Odoo's users to the same as the outlook accounts
 4. Create some shared events with the second user on the first
    outlook calendar and vice versa
 5. Sync the first user's calendar with Outlook
 6. When the events are fetched to the Odoo, sync the second user
   => emails send to the attendees

The solution is to exclude synced events from the first synchronization.

opw-2929673

closes odoo/odoo#112931

X-original-commit: 86862f2527341247b75df155de16b09d44a7eee6
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-02-17 11:01:42 +01:00
Renaud Thiry 7b6638407d [FIX] calendar: redirect to auth url
In 16.0, at 6a42ec7c73
an error was introduced redirecting users to the configuration panel
when clicking the 'sync' button for extenal providers in calendar.

This simply replaces that call with a redirect to an authentication url
received from the back-end.

task-3131128

closes odoo/odoo#111392

X-original-commit: 0574c18acd70c3fe52cdb5cbe563ffa02f5f5ad3
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
2023-02-03 09:28:30 +01:00
Ivan Yelizariev 153fe67f46 [FIX] microsoft_calendar: avoid errors on events without user_id
Field `user_id` of `event.event` is not required

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/event/models/event_event.py#L119-L121

---

So, `ensure_one` might raise an error in `_microsoft_patch  >
microsoft_calendar_token > _get_microsoft_calendar_token`

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L404-L420

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L51-L53

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/res_users.py#L35-L39

---

`_microsoft_patch` is used for syncing Odoo data with Outlook calendar

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/calendar_attendee.py#L23-L51

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L96

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L204

---

Ignoring such an error seems fine, because `_microsoft_patch` is used after
commiting the changes to database anyway

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L24-L49

---

closes odoo/odoo#111587

Ref: https://sentry.io/organizations/online/issues/3907527262/
X-original-commit: 68c5e649af67b8dc1f9c2470356b72011b32e393
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-02-03 01:13:39 +01:00
Denis Ledoux b4a7996e96 [IMP] base, *: change the API of init hooks to pass env
This is mostly a cleaning/refactoring change.

The current API for init hooks (pre, post, uninstall) is to pass
`cr, registry`.
But the first thing which was done by most
post init and uninstall hooks was to create an env using
the cr passed
e.g.
`env = api.Environment(cr, SUPERUSER_ID, {})`
and the `registry` argument was unused in all these hooks,
completely.

By changing the API of hooks to pass `env` instead
of `cr, registry`, we gain in average two lines in every
hooks:
- the line creating the env `env = api.Environment(cr, SUPERUSER_ID, {})`
- the line importing `api` and `SUPERUSER_ID`

Therefore removing ~250 lines of repeated code lines accross odoo/odoo and
odoo/enterprise.
In addition to these lines removed,
it also ease the API of init hooks for Odoo developers,
who are used to that `env` and not so much how to create an `env`
from a cursor.

Part-of: odoo/odoo#108254
2023-02-01 10:25:01 +01:00
niyasraphy 5a88ed886a [FIX] {}_calendar, google_recaptcha: fix field alignment in settings
before this commit, the field and labels are aligned in different lines in the settings.

closes odoo/odoo#109683

X-original-commit: 5844a0446ef9712027aa08fc239bbb858d164b87
Signed-off-by: Arnaud Joset <arj@odoo.com>
2023-01-11 22:43:14 +01:00
Renaud Thiry 53cad6f9f7 [FIX] calendar: show dialog when sync unconfigured
## Issue

Currently if an administrator installs one of the sync modules but does
not set any credentials. If the user tries to sync their calendar
they are met with an error.

## Fix

Make sure they get a clear dialog explaining why they cannot sync.

task - 3056311

X-original-commit: 6ec6a3764c5e5460aa8a1cdfa228740606fdfe13
Part-of: odoo/odoo#106517
2022-11-25 17:56:31 +01:00
Renaud Thiry 13db30cba5 [FIX] calendar: show calendar sync when installed
## Issue

Regular users were not able to see the sync button
used to sync with external calendar services even after
these services were configured

## Fix

Conditionally display the whole sync section until one of the
services is configured.

Override the display conditions when one of the relevant modules are
installed.

task - 3056311

X-original-commit: 29f820cfd421859a2b480725ba2a81a515509b88
Part-of: odoo/odoo#106517
2022-11-25 17:56:31 +01:00
William Braeckman 6a42ec7c73 [IMP] calendar: migrate attendee_calendar to wowl2
Migrates the attendee_calendar view aswell as the modules patching it.
The code has been simplified as much as possible to reduce complexity
while still retaining a similar flow.

TaskId-2999194

closes odoo/odoo#101492

X-original-commit: ee14c3ec4830454d80a63793a91f6d1c838363f1
Related: odoo/enterprise#31963
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-28 20:29:51 +02:00
Rémy Baranx (bar) e00622efee [FIX] microsoft_calendar: cancelled event without Odoo organizer
When an event is created in Outlook by an Outlook user (user A) who does not
exist in Odoo but who invites an Odoo user (user B) who syncs his calendar with
his Outlook calendar, the event will appear in the user B Odoo calendar.

If user A cancels this event in Outlook, then when user B syncs his Odoo calendar,
the event must be removed.

closes odoo/odoo#87844

Task-id: 2746046
X-original-commit: f54a56a91e75e3de8b54a7c6c76164929a11a431
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-09-21 18:02:38 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Florian Charlier ba2b0020df [IMP] calendar, *: configure provider
* = google_calendar, microsoft_calendar, web

Purpose:
Allow to install appropriate module and configure calendar provider credentials
in fewer steps, without needing to go to general settings, etc.

This requires that both buttons are visible from the start.

In this commit, we also prepare the ability to extend this configuration wizard
for the appointment onboarding (see ENT PR).

Task-2852375
Part of Task-2900763

Part-of: odoo/odoo#97105
2022-09-07 23:10:17 +02:00
Rémy Baranx (bar) 77e89e893c [FIX] microsoft_calendar: issue when archiving several events
In the `write` method, accessing the `ms_organizer_event_id` field of
`self` leads to an exception if `self` represents several records.

So, the idea of this fix is to set the `need_sync_m` field of all modified
records to `True` when at least a field to sync with Outlook is modified
(see `_get_microsoft_synced_fields()`) and then, at the end of the `write`
method, really patch or delete records that are already linked to Outlook
(that means they already have their `ms_organizer_event_id` field set).

closes odoo/odoo#96761

X-original-commit: 1a66343327f9ea9f59ba25ea63e26331cabb65b5
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-07-27 19:20:15 +02:00
Rémy Baranx (bar) 2fbfbf0dce [FIX] calendar, microsoft_calendar: backport bugfixes from master
As several customers complained about lot of bugs in microsoft_calendar in 14.0,
It has been decided to backport bug fixes of the model layer from master to 14.0,
without the need of an upgrade script (no new field, ...).

In master, we use 2 ids (organizer event id + universal id) instead of only one,
to handle Odoo <-> Outlook sync correctly when several attendees sync their Outlook
calendar with their Odoo calendar. For that, we have added a new field.
To report this bug fix in 14.0, the existing field which stores the organizer event id,
is now a string storing both ids separated by a ':' as follow: 'organizer_event_id:universal_id'.

2 new compute fields have been added to be able to use these 2 ids more easily.

(all commits from the original PR have been squashed to ease forward-port)

closes odoo/odoo#95736

X-original-commit: 5e83318a7240585371efd31e407829793f3e732f
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-12 13:21:27 +02:00
Rémy Baranx (bar) 90480ce2d1 [IMP] microsoft_calendar: get videocall URL from a Outlook event
Basically, a Outlook event may contain a videocall URL in 2 different ways:

1) the event location may be a specific URL (such as `https://teams.microsoft.com/...`).
 In this case, we use it as `videocall_location` instead of classic `location`.
We use a list of patterns to identify these specific URLs among classic locations.

2) the event may have an attribute `isOnlineMeeting` set to `True` and
the attribute `onlineMeetingUrl` set with the URL. In this case, we use
this `onlineMeetingUrl` as `videocall_location`.

opw-2601669

closes odoo/odoo#74785

Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-07-11 13:48:40 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli ac584e171d [REF] *: BS5: Migrate Badge
From [1]:
> Dropped all .badge-* color classes for background utilities
> (e.g., use .bg-primary instead of .badge-primary).

We now have to manage constrast for some badge. It's why we
add 'text-dark' at some point.

Note:
Due to the backport of 'text-bg-#{theme}', we can use this to
avoid to use 'text-dark'.

Ref:
[1] https://getbootstrap.com/docs/5.1/migration/#badges

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:18 +02:00
pedrambiria d3f3f44f7a [FIX] microsoft_calendar: fix the DateTime range
Before this commit, the DateTime range for getting events was six years,
while the Microsoft range limit is five years.

opw-2819858

closes odoo/odoo#93657

X-original-commit: 56f9b7646269d953c3068a12f20436d3afc970b1
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2022-06-15 10:00:16 +02:00
Fabio Barbero fc79bd1e0e [IMP] sm modules: "neutralise" genders
Purpose
=======
Change all masculine nouns in Odoo's code to neutral nouns (when
possible), making sure that demo data is correctly handled. This is
particularly important since our code is open source, and nowadays lots
of machine learning models are trained on open source repositories.

With this small change we contribute to training more "fair" models, and
teaching models that "employee" or "user" != "he".

This also affects some text visible by the user, hence making it more
inclusive for Odoo users.

Task-2853046

closes odoo/odoo#91292

Related: odoo/enterprise#27302
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-16 10:09:32 +02:00
pedrambiria fb6b959fef [FIX] microsoft_calendar: sync events without body property
Before this commit: if a Microsoft event didn't have body property,
it couldn't get synced with Odoo and raised an error.

The solution is first to check if it contains the body and then gets
its content value.

opw-2765443

closes odoo/odoo#89634

X-original-commit: 13d57ff5e714bee96fb930c1b8050816bf22c268
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2022-05-09 12:57:42 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as 
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default

This will reduce noise/inconsistencies between manifests specifications, 
simplify analysis of manifests content, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
Florian Damhaut d9f16de7bb [FIX] microsoft_calendar: Send html description to outlook
Step to reproduce:
- Create a with a link in the decription
- Edit + Save multiple times

Current behaviour :
- Since c2b545fd8d91b7d24380ada07adee02f24623ecf we fetch the full
description with html tags which are rendered via the
- When we resend this message to outlook, the description
 will be updated via html2plaintext.
 In the case of URL, they will be added as a footnote and thus
 duplicated if the url is it's own name

Behaviour after thr PR:
- We could then also send the description with the html tags to
ensure full compatibility between the description
- Using html2plaintext update the descrtiption to markdown, with some
issues, since html is now supported in the odoo editor, using
html on both end will remove the need to use html2plaintext and
the descriptions changes stemming from it.

opw-2746358

closes odoo/odoo#87411

X-original-commit: 4c3b69a30d5724dfef2b179ac8eaeecb8ff3da42
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2022-03-29 10:56:36 +02:00
Loan (lse) 68663f1b2b [FIX] microsoft_calendar: prevent parallel JS calls to sync_data
Before this commit:
A call to `sync_data` was made each time an event happen in the calendar
( changing the day, switching to day/week/month/year ).
This can easily saturate the server and spam the Microsoft API.

After this commit:
One call is made at a time per tab.

This PR is an adaptation of the same fix which was done only for
Google calendar at:
https://github.com/odoo/odoo/pull/69619/files#diff-8457ad89f2f7a1847af533828b40994bfc6d80e1e9d45ee7707b534bda2b0f06
and partially solve another PR that I was planning (but a bit too "overkilled"):
https://github.com/odoo/odoo/pull/85465

OPW-2749791 & OPW-2741728

closes odoo/odoo#85754

X-original-commit: d25b3d783fd08cd1c84095da554f52b463422bc2
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-03-07 10:41:44 +00:00