Before this commit, when user set privacy as 'Available' from odoo it is not
properly synchronize in google calendar.
After this commit, privacy value changes will be properly synchronized when
changes will be made from odoo to google calendar.
task-3667696
closesodoo/odoo#162486
X-original-commit: 888e65c9ff08866a7cda2cdf2e2b8c766fb773ca
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Before this commit when we have a synced event with google and then we toggle the all-day field
changes didn't reflect on google side
This happened because google uses two separate fields for start/end.
1. dateTime (used for normal events)
2. date (used for all-day events)
when one of them is set, the other must be null.
Before this commit when we did a patch update, we set only one, but forget about the other which raises an error.
closesodoo/odoo#157664
Task: 3681668
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
The `test_accepting_recurrent_event_*` tests make sure that accepting recurrent events on google side reflect in odoo.
The test was failing because of the following:
when retrieving the invited attendee, the test used `self.assertEqual(event.attendee_ids[1].state, expected_states[i])` assuming that organizer will be at index `0` and invited user at index `1`.
However the list of `event.attendee_ids` is ordered by create_date.
And we create both organizer and attendee with the same command at the same time: `partner_ids=[Command.set([self.organizer_user.partner_id.id, self.attendee_user.partner_id.id])]`
So we might have organizer at index `1` and invited attendee at index `0`. This resulted in the indeterministic behavior of the test.
To fix this issue:
This commit changes how the invited attendee is retrieved, making sure that we always get the right attendee.
fixes runbot-61527
closesodoo/odoo#162279
X-original-commit: 6db2614283abfc035343f021b9cfc52609aa9d44
Signed-off-by: Ahmad Almaghraby (alah) <alah@odoo.com>
Before this commit when accepting a recurrent event from google calendar with option "this event", it didn't reflect on odoo calendar.
This happened due to the write_date check which applies google update only if their write_date is after odoo write_date,
but multiple updates from google might change some events write_date to now, which causes other google updates to get discarded.
This commit aims to fix this issue by keeping the write_date of the affected events before applying any google updates, and considering these dates instead of the live odoo write_date.
closesodoo/odoo#160357
Task: 3731552
X-original-commit: 3bcf6c458a4b483af6467d1c027b60771d1ce08d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Remove 'videocall_location' when not sent by Google, otherwise the local
videocall will be discarded.
closesodoo/odoo#159111
X-original-commit: b56cd52bdd73c193d98fa334e80b363218cc13b9
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Before this commit: the Google button status did not update automatically when we restart the sync.
This commit aims to fix the issue by using state for reactive values that control the button state.
Task: 3731623
Part-of: odoo/odoo#155174
Steps to produce:
- Configure Google Calendar and navigate to the calendar app.
- Click on the Google sync button, redirecting to the general settings.
Before this commit, the Google sync pause buttons directed users to the general
settings.
with this commit, it now redirects to the calendar settings.
task-3731652
Part-of: odoo/odoo#153581
For a first iteration, Russian translations were done using DeepL using
1 large .pot file of all the standard modules to translate (e.g. no
localizations, no test modules, etc). Unfortunately for some reason
doing a msgmerge with the existing ru.po files didn't seem to work, so
old "Translators" metadata at top of files were lost (maybe they will be
re-added during next Transifex sync?)
Part-of: odoo/odoo#152285
Issue
When a location is set on an event, the google meet link is also
generated, leading to confusion about the meeting format.
Steps to reproduce
- Create an event with a location
- Sync the Calendar with Google.
- Observe that a Google Meet link is sent with the email.
Solution
check if the loacation is set before generating a google meet link.
opw-3589379
closesodoo/odoo#149654
X-original-commit: 6aabe1b30598a8a616db01ae46dffece8f3f876c
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
Signed-off-by: Kawtar Drissi El Bouzaidi (kdeb) <kdeb@odoo.com>
Currently the calendar integration can be accessed from the cog menu when in
the calendar module in the calendar view. However, it is a bit hidden. This
commit removes the button for calendar integration in the cog menu and also we
move the calendar integration settings from the general settings to a new
calendar specific settings page.
task-3570053
Part-of: odoo/odoo#139736
Currently the onboarding of calendar is set if you simply open the credential
configuration page and close it. Ideally we just want to close it if the
credentials have been set. This commit implements this change.
task-3570053
Part-of: odoo/odoo#139736
This commit changes the wording of actions and notifications in the modules
listed below:
1) Discuss (Leave Conversation)
2) Web (Delete Filter, Get View - Close, Tours - Close, and property field
access warning)
3) Calendar (Stop Synchronization, Configure, and Discard)
4) CRM (Assign Leads)
Task-3390780
closesodoo/odoo#130353
Related: odoo/enterprise#44919
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
PURPOSE
Allow alias domains to be multiple, notably to be used in a multi company
environment where each company has its own alias domain.
SPECIFICATIONS
Make mail gateway support alias domains instead of relying on configuration
parameters. This implies the following changes
* destination alias check is now based on full email by default. Previously
only left-part of aliases were checked. Optionally an allowed list of
domains could be additionally checked. Default from now on is to check
the complete email e.g. 'sales@mydomain.com' != 'sales@mydomain.in';
* detection of direct write to catchall implies checking all domains
catchall emails;
* detection of write to bounce implies checking all domains bounce emails;
* when having to send bounce emails using the bounce alias as mailer-daemon,
find the bounce email from the relevant company;
However we have to ease transition from the old ICP-based model used since
ages to the new domain-based model. Notably a common usage of mail gateways
is to do mail forwarding e.g. forward mail from domainA to domainB without
rewriting destination. It means that e.g. sales@mail.domainA should be
considered as a valid alias equivalent to sales@mail.domainB. This was
working due to left-part only check of destination aliases. In order to
keep this setup working after migration a flag is added on aliases allowing
to keep the detection of those aliases based only on local parts.
In summary: When searching for aliases, mailgateway now either checks for
exact email, either for matching local parts when the flag is active. This
is not the default behavior, as we want a stricter comparison of emails by
default but it will be the default behavior at **migration time**.
The 'mail.catchall.domain.allowed' configuration parameter is kept. It is
used only for left-part check aliases, allowing to limit the scope of the
match.
Task-36879 (Mail: Support Multi Domains Aliases)
Part-of: odoo/odoo#76734
This commit fixes some google_calendar tests as they use keys that don’t exist
in the google calendar API. In google calendar, we don’t receive a status, but
a responseStatus.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
Before this commit, the sync buttons for google and microsoft would appear in
the calendar sidebar even if the sync was not set (module not installed and
credentials not set). After this commit the buttons only appear in the sidebar
if the credentials for that service are set.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
Before this commit: we assumed an event's recurrence only contains
RRULE, and we were getting the RRULE from the first element in the
list. But it could have EXRULE, RDATE, and EXDATE, so in this case,
the first element could be other items.
The solution is to iterate through all items and return the RRULE.
opw-2797968
closesodoo/odoo#138697
X-original-commit: f2a20457b352026c2dfb50f6a4d48d47211708f9
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
To avoid developers to update the dict of `_events`
in their overrides, to not alter by mistake
the default behavior.
Using a frozendict will force them to create a copy
of the dict.
closesodoo/odoo#123261
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
When an event is created by user A and user B is invited, user A automatically
accepts the event. If both users are using google sync and user B accepts the
invitation from the google interface, the status of the events are set to
needAction for user A. This occurs because the odoo values will always write
the time related fields, even when those did not change. This causes the
status to be changed to needAction because we assume the time of the event has
changed and user A needs to verify it. This commit fixes this by only setting
time values when they were really changed and by switching the logic that
triggers the reset of the status. As most times a default alarm is generated
by google, we should not treat it as condition for updating the time and,
therefore, potentially updating the status of the attendee.
task-3464054
closesodoo/odoo#137471
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
Before this task, lots of mails were sent after updating or deleting recurrent event in 'All events' or 'This and future events' update type. This was happening because updating these recurrent events was triggering patch calls event by event, when they should be handled in batch.
After this commit, updating or deleting recurrent events should trigger at most two mails for Google users.
closesodoo/odoo#137607
Task-id: 3163695
X-original-commit: ad2106babda61446bce13283d570dc723418b630
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
Add a helper method to know when the user calendar
is fully synced to Google Calendar, meaning when
API calls can correctly be performed.
The user calendar is considered fully synced if the
Google API is correctly configured in the settings
(Client ID / Secret) and the user has synced its
calendar with its Google Account.
Task-3285601
Part-of: odoo/odoo#133921
Add a 'google_meet' value for the event videocall location
to make the difference between a custom videocall link and
a google meet one.
Task-3285601
Part-of: odoo/odoo#133921
Purpose
=======
Add the possibility to only synchronize one specific event of
a user calendar instead of syncing the whole calendar.
Specification
=============
In certain cases, we do not want to synchronize the whole user
calendar with all the events and recurrences but only a specific
event. For example, in appointment, to retrieve the generated
google meet url of a specified event.
To perform the single event synchronization a synchronization
token is needed, meaning we cannot do a single event
synchronization prior to a full calendar synchronization as it
is the full sync which generates the temporary sync token.
To prevent the need of doing a full sync before a single event sync,
the permanent synchronization token is been used instead of
the temporary one when performing a single event synchronization.
Task-3285601
Part-of: odoo/odoo#133921
Update (some) query counters according to runbot state.
Also make some tests deterministic when involving company name.
Task-36879 (Mail: Support MultiCompany Aliases)
closesodoo/odoo#135288
Related: odoo/enterprise#47345
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
psycopg2.extras.execute_values was introduced in PR #101237
however it pypasses the override logic for cr.execute. As a result
1. --log-sql cannot log these queries
2. assertQueryCount cannot notice these queries
...
This commit create a new api cr.execute_values to support the same SQL feature
without losing the override logic for cr.execute
closesodoo/odoo#131190
Related: odoo/enterprise#47374
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
This commit removes the jQuery UI Datepicker usage for the sidepanel's
mini-calendar in the Calendar View and replace it by our own
DateTimePicker component.
On the visual side, the styling has been aligned to the DateTimePicker
one and takes a bit more space to allow a better readability.
It also adds two props to the DateTimePicker:
- showWeekNumbers : allow to show or hide the week numbers' column, default to true.
- daysOfWeekFormat : allow to choose between the "short" or "narrow" (1
letter) format for the week's days column header, default to "short".
task-3439226
closesodoo/odoo#134263
Related: odoo/enterprise#47114
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
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
closesodoo/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>