Commit Graph
984 Commits
Author SHA1 Message Date
Louis (wil) 3f6f949fa5 [I18N] export sources
closes odoo/odoo#140002

Related: odoo/enterprise#49687
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-10-27 08:36:16 +00:00
Pratik Raval 28097c6dc2 [IMP] various: update wording of action labels
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

closes odoo/odoo#130353

Related: odoo/enterprise#44919
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-10-25 15:50:30 +00:00
Thibault Delavallée 3a0da2278f [IMP] mail: respect alias domains in mail gateway
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
2023-10-24 19:24:50 +00:00
Leonardo Pavan Rocha 670ba4b819 [FIX] google_calendar: fix google attendee values in tests
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
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha d87d5fe51f [IMP] {google_,microsoft_}calendar: only show sync buttons if sync credentials are set
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
2023-10-23 20:07:23 +00:00
pedrambiria ec25a56c26 [FIX] google_calendar: get RRULE when recurrence contains more items
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

closes odoo/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>
2023-10-16 07:58:45 +00:00
Thomas Lefebvre (thle) 7a33a52371 [FIX] google_calendar,microsoft_calendar: use ReadonlyDict
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.

closes odoo/odoo#123261

Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-17 18:43:10 +00:00
Leonardo Pavan Rocha 8b7f1c892b [FIX] google_calendar: sync setting needs action status to accepted event
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

closes odoo/odoo#137471

Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2023-10-09 09:33:48 +00:00
Gabriel de Paula Felix (gdpf) a0d4c62108 [FIX] google_calendar: do not spam while updating recurrent events
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.

closes odoo/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>
2023-10-05 15:36:25 +00:00
amdi-odoo c2f337779b [IMP] google_calendar: add google sync helper
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
2023-09-22 11:55:51 +00:00
amdi-odoo ec073feeb4 [IMP] google_calendar: add google meet videocall url
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
2023-09-22 11:55:51 +00:00
amdi-odoo a3eed99161 [IMP] google_calendar: add single event synchronization
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
2023-09-22 11:55:51 +00:00
Thibault Delavallée 8409ebe5fb [FIX] various: update query counters to runbot state
Update (some) query counters according to runbot state.

Also make some tests deterministic when involving company name.

Task-36879 (Mail: Support MultiCompany Aliases)

closes odoo/odoo#135288

Related: odoo/enterprise#47345
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-19 16:37:13 +00:00
Chong Wang (cwg) 13957b6281 [FIX] core: support cr.execute_values
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

closes odoo/odoo#131190

Related: odoo/enterprise#47374
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-09-14 11:22:42 +00:00
Pierre Paridans 7552284e78 [REF] web: replace jQuery UI Datepicker usage in Calendar view
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

closes odoo/odoo#134263

Related: odoo/enterprise#47114
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-09-13 10:55:49 +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
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) 9ae8f7dda3 [IMP] google_calendar: add synchronization pause button and tests
Configuration and tests added for 'pause synchronization' button (Google module).

Task-id: 3290898
Part-of: odoo/odoo#126560
2023-08-21 12:38:43 +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
Gorash 1e12f68a1d [REF] base,all: Update modifier syntax: prepare view migration
These changes are made as a result of simplifying attrs and 'states' in
views.

Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.

Part-of: odoo/odoo#104741
2023-08-18 09:49:12 +02:00
Pedram (PEBR) ff3c554088 [FIX] google_calendar: ensure syncronization with cancelled event
This commit addresses a synchronization issue with Google Calendar,
which arose after the implementation of commit https://github.com/odoo/odoo/pull/94018/commits/d9c4043557c6460b3860216bdfd39a623a5e0795.
The mentioned commit added tracking to the pre-commit process,
inadvertently causing problems during Google Calendar synchronization.

During the synchronization of Google Calendar, a recurring event that
had one of its occurrences deleted resulted in Google sending both a
recurring event record and a cancelled single event. In Odoo's
synchronization process, it first created occurrences for the recurrent
event and then synced the single events. During this synchronization of
single events, the existing cancelled events were unlinked using the
`_cancel` function to remove the event.

The issue surfaced when the `_message_track_post_template` function was
called in the pre-commit phase. If the appointment function was
installed, the `_track_template` was overridden in this module, leading
to an attempt to access the removed event, which raised an error and
prevented calendar synchronization.

With this modification, the `_track_template` will not be called for
the created event that was cancelled in the same transaction.

opw-3418758

closes odoo/odoo#132174

X-original-commit: c1a455f6a46a8c936176e306f35651d60e39f869
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-17 16:37:14 +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
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
Gabriel de Paula Felix (gdpf) 26f2e3b8e2 [FIX] google_calendar: events guest modification permission
Before this commit, the permission defined in Google Calendar of editing events by guests was always set in Odoo Calendar as 'True', even though there was also the 'False' option. This way, creating an event that didn't accept being edited by guests in Google and then updating it in Odoo by a guest was creating duplicates in Odoo Calendar and wrong lists of attendees.

After this commit, the permission of guests modifying the event is taken into account in Odoo Calendar. If a guest updates an event that doesn't allow updates, a warning is shown forbidding the update and the reason explained.

closes odoo/odoo#127397

Task-id: 3276829
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-11 13:06:58 +02:00
Thibault Delavallée b5949d1672 [REF] test_mail, various: prepare gateway / alias tests
Rename alias domain and aliases used a test data. This allows to make
them easier to read, follow, grep and understand.

Activate multi-company on alias and gateway tests, ensuring it currently
has few impact on tests.

Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130768
2023-08-03 21:56:56 +02:00
Thibault Delavallée 700a84edc9 [FIX] google_calendar: avoid browse(False) instead of void records
If no partner is found for a given email after calling '_mail_search_on_user'
and '_mail_find_partner_from_emails' the returned result is a void recordset
for the email.

When rebrowsing partners afterwards, browsing p.id for each partner leads
to potentially browsing False, which gives a different recordset from a
void recordset. This further causes a crash in '_write_from_google' as
he considers [False] as not being void.

This commit fixes that by correctly filtering out void partners. This is
globally a followup of odoo/odoo#99330.

Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130768
2023-08-03 21:56:56 +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 595aa24843 [IMP] registry: multiple ormcache
One of the main issue with ormcache is that the invalidation clears
everything, meaning that some value, slow to compute but with a long
lifetime, can be removed from the cache because an easy to invalidate
value is cleared, like after writting or creating a product has an
example.

Most example in the code will try to invalidate the cache of the models
doing something like `env['ir.qweb'].clear_caches()` but it is
finally equivalent to `env.registry.clear_cache()`, and cross worker.

The idea is to have multiple cache, maybe with specific sizes for a
specific purpose.

Having one per model is maybe a bad idea because it will be difficult
to size the LRU correcly, and it is too dynamic. Checking invalidation
may be expensive.

The proposed solution is closed allow a limited number of named caches,
using onse sequence per cache. This is actually close to the
cache_longterm.

We want to discourage using a specific cache for one use case in
the buisness code. Adding a cache shouldn't be something easy, doable
in stable.

Note that we could also change the invalisation mecanism using an
insert only table. We an check the sequence of this table, but also
fetch all invalidation messages.
Another possible improvement, especially if we have more than x cache is
to have a global sequence, checking signaling would mean to check the
main sequence, and only the other ones if the main one changed.

Note that this poc is inspired from the long term cache but not all
use case where applie yet.

Part-of: odoo/odoo#119813
2023-07-18 11:42:26 +02:00
Gabriel de Paula Felix (gdpf) fa23a1d118 [IMP] google_calendar: test checking single recurrent event deletion
Added a test asserting the correct functionality of single events deletion.

X-original-commit: 2676c0e1b9988e862d2c21479d34372b1a5c9cea
Part-of: odoo/odoo#127980
2023-07-17 18:13:15 +02:00
Yannick Tivisse b1f7e56f79 [IMP] base: Remove private res.partner type
- Improve performances, as the ir.rule restricting private partners
  visibility is also applied on res.users by inheritance, on each
  prefetch.
- Solve the issue of partners set as followers on records (eg: application
  form) and then made private, making them impossible to contact via the
  chatter.
- Solve the multiple access issues when trying to access the bank
  account, or the private address for non HR people like the accountants
  forcing the usage of sudo in the business code.

TaskID: 3101400
2023-07-05 14:21:28 +02:00
Thomas Lefebvre (thle) 395d74aa11 [FIX] google_calendar: prevent blocking synchronisation
Issue:
------
Since commit 3f145af00307383e2d0a0891d05b8db59b13662a

Some events that belong to a recurrence and
have been modified are not detected as existing.
The `full_recurring_event_id` method blocks these events.

Solution:
---------
Test regex expressions before using them.

opw-3344408

closes odoo/odoo#123333

X-original-commit: f34fa6e905b9426be8040d4e021f1849b3373184
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-06-02 07:56:56 +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
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +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
Thomas Lefebvre (thle) 61ba5037dc [FIX] google_calendar: edit schedule of recurring event
Steps to reproduce:
-------------------
We google calendar, create a recurring event with
three occurrences.
We obtain 3 events in chronological order:
- A
- B
- C
Change the title of the event B and apply the changes
to the following events.
We get:
- A: First title
- B: Second title
- C: Second title
Modify the schedule of event C and apply the changes
only to this event.
We get:
- A: First title + First schedule
- B: Second title + First schedule
- C: Second title + Second schedule
Synchronize Google calendar with Odoo.

Issue:
------
Event C is "duplicated".
Event C will exist with the first schedule
and the second schedule.

Cause:
------
A recurrent event with `google_id` is equal to
`ID_RANGE_TIMESTAMP` can be rescheduled.
If this is the case, its `google_id`
will be equal to `ID_TIMESTAMP`.

We do not manage the deletion of the event
that belongs to the old `google id`.

Solution:
---------
When we detect a recurring event with
a modified schedule, we have to delete the event
from the old `google_id`
(which is the event with the old schedule).

For this, it is necessary to find
the old `google_id` based on the elements contained
in the `id` and the `recurringEventId` of the event.

opw-3143680

closes odoo/odoo#121825

X-original-commit: 3f145af00307383e2d0a0891d05b8db59b13662a
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-22 13:53:56 +02:00
pedrambiria fc002590db [FIX] google_calendar: use the event user token to send the request
Before this commit: it was possible to create an event for another user as
its organizer. But even if that user has a synchronized Google calendar, it
will be sent by the current user token, and it causes several issues.

The solution is to use the event's organizer token if it exists.

opw-3076595

closes odoo/odoo#120368

X-original-commit: 966943168dc9da0622485a46b0786ed5765eaf77
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-05-22 11:42:55 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Pierre Paridans eef262abf4 [FIX] *: adapt QUnit tests and tours
[FIX] *: selectors in tours

[FIX][TMP] account: CogMenu selector in tours

[FIX][TMP] web*: Breadcrumb targetting in tours

Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).

add classname on last breadcrumb item

[FIX][TMP] project: View buttons selector in tours (moved away from CP)

[FIX][TMP] project: Kanban selectors in tours (quick create)

[FIX][TMP] *: SearchBar selectors in tours (toggle menu)

[FIX][TMP] *: ButtonBox selector in tours

[WIP][IMP] web: add toggleSearchBarMenu in search helpers

adapt and unskip 3 list tests

adapt and unskip calendar tests

unskip web_tour test that actually pass

post rebase fix

allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later

post rebase fixes

fix

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +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
Nasreddin Boulif (bon) df187c4cc2 [FIX] google_calendar: sync the right description
Steps to reproduce:

  - Install 'CRM' module (for test purpose)
  - Configure the google calendar credentials on Odoo
  - Go to CRM -> Configuration -> Activity Types and create a new one
  - Set 'Meeting' as Action
  - As default note, add some bullet points:
    ```
    Hello :
      - First point
      - Second point
      - Third point
    ```
  - Open any Opportunity and create a new Activity (in the chatter)
  - Select 'Meeting' as activity type and open the calendar
  - Add a new event (description should be field with the default note)
  - Open the event (on Odoo and/or Google Calendar)

Issue:

  The description of the event is broken (bullet points missing).

Cause:

  When syncing the event from Odoo to Google Calendar, the description
  is converted to plain text (using `html2plaintext` function).
  Then, when syncing the event from Google Calendar to Odoo,
  the description is also updated locally with the remote one.

Solution:

  Don't convert the description to plain text but use
  `tools.html_sanitize` on the html content instead to sanitize it.

opw-3105194

closes odoo/odoo#119695

X-original-commit: 21f3f9aa31a44840077b80d27aaee8160b391308
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-04-28 11:18:26 +02:00
Achraf 20e4bd9bb3 [FIX] google_calendar: Change logger type from error to exception
In sentry we receive like 2k syncing issue from google_calendar.

This commit converts `_logger.error` to `_logger.warning` because we don't
need an erro for that

sentry-4121123364
https://online.sentry.io/issues/4121123364

closes odoo/odoo#119742

X-original-commit: e797712561113f098edc1346995cecd7e96ad362
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2023-04-26 17:06:28 +02:00
Thomas Lefebvre (thle) 9d5b4d218e [FIX] calendar, google_calendar: prevent duplicated base event
Issue:
------
It is possible to create recurring events
that are in the same DST period.
Unfortunately, the basic event is sometimes duplicated

Cause:
------
The cause comes from the Daylight Saving Time (DST).

With the base event, we create a recurrence.
This recurrence will create all the events
of the recurrence.
To achieve this, with the basic event, we create all the ranges.
Then, we compare these ranges to remove those which already have
events.
Logically, we must reconcile the first range with the base event.
Sometimes the range of the base event and the first range
calculated to generate the occurrences do not match.

The consequence is the creation of a new event.
The cause of this problem is that we go back too far to find
the starting date of the period from which we will generate the ranges.

For example, in the case of a recurrence with a frequency of `MONTHLY`,
we will take the first date of the month.
And if we are in the month when the DST changes,
we will have the problem.

Solution:
---------
The solution is not to go back
if we encounter a difference in the DSTs
between the starting date of the base event
and the starting date for generating the ranges.

opw-3143680

closes odoo/odoo#119073

X-original-commit: 065dd4a2548ff0da6cf23a7ac62321ce99500d35
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-19 17:31:49 +02:00
Martin Trigaux 69f911d994 [IMP] *: enforce usage of Markup in mail
When using message_post, the body format must be explicitly specified.
If html is expected, a Markup object should be used.
If text is given, the content will be escaped.

Before this PR:
message_post was unaware if the content of a message was HTML or
text. This lead to multiple situation where the content was
incorrectly considered as HTML and led to display errors.
In
  self.message_post(body="Hello %s!" % self.name)
if the name contained HTML, it would be evaluated.

In
  self.message_post(body="Contact Raoul <raoul@caramail.be>")
the email would not be displayed as considered as unknown HTML and
discarded by the sanitizer

Now each call must explict the type of content.
Use the escape() helper to properly combine Markup and translations.
It would also be acceptable to use Markup() to wrap a static
translation but escape is better as one can not guarantee the content
of a translation.

closes odoo/odoo#111850

Related: odoo/documentation#3612
Related: odoo/enterprise#36728
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-13 16:39:48 +02:00
Arnaud Joset abdf22c9dc [FIX] google_calendar: keep partner order according to email order
Before this commit, when an event was synced with internal and external users,
the corresponding partners were merged like this:
1) partner corresponding to internal users
2) regular partner

If the list of emails provided by google was in another order: regular partners
then internal, there were an issue:

```
emails = [a.get('email') for a in google_attendees] # sorted by google, external then internal for example
partners = self._get_sync_partner(emails) # always internal then external partners
for attendee in zip(emails, partners, google_attendees):
    # we are associating the external email with internal partner
    # the external attendee is skipped because we take the user partner
```

This commit makes sure to return the partner is the order of the mails in _get_sync_partner.

closes odoo/odoo#118355

X-original-commit: ae442c20878277da93feb8761f5ed556c0c735b2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2023-04-13 05:07:41 +02:00