Commit Graph
11287 Commits
Author SHA1 Message Date
Zelong Lin 69fe16d42d [IMP] mail: make mentions in chatter full composer
Before this commit, it was not possible to send messages in
full composer containing user mentions. Even whe the mentions were
added in the small composer and then continuing composing the message
in the full composer.

With this commit, we can now make user and channel mentions in the
full composer, by typing `@` and `#` like in the small composer of
Discuss.

When composing a message in small composer and then switching to full
composer, the mentions are preserved.

task-3470060

closes odoo/odoo#132701

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-05 16:49:04 +00:00
Didier (did) e3d68312fa [IMP] mail: improve escape key usage in discuss app
This PR introduce multiple usage of the escape key:

- Channel selector can now be closed using the escape key
- Using the escape key will focus the composer automatically

Task-3456518

closes odoo/odoo#135031

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-05 13:37:50 +00:00
Jorge Pinna Puissant ef424a9dc2 [REF] *: remove owl from linter's accepted global variables
Before this commit, owl was in the linter's accepted global variables.
This allowed  direct access to owl global object.

For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`

Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:

`import { xml } from "@odoo/owl";`

task-id 3498859

closes odoo/odoo#137517

Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-10-05 10:21:53 +00:00
Alexandre Kühn 6ffea84866 [FIX] mail: make call invitation work from recent discuss model REF
Discuss model data that had commands have been simplified by [1].
Notably some `unlink` were replaced by `False` and or `DELETE`.

Some code in Discuss calls was still expecting receiving command data
in of `DELETE` while data received has become `false`. As a result,
the state of ringing threads and showing call invitation card was not
working.

This commit fixes the issue by relying on recent improvements that
commands can be passed immediately as data to relational fields [2].

Code in Discuss call still have some coupling between fields whenever
some records are either added to or removed from a field. Hooks
`onAdd` and `onDelete` on relational fields are added to support
these cases.

[1]: https://github.com/odoo/odoo/pull/136308
[2]: https://github.com/odoo/odoo/pull/137341

closes odoo/odoo#137540

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-04 20:52:41 +00:00
Alexandre Kühn b1edee9a84 [REF] mail: simplify discuss model insert code
1. simplify message reaction formatter (personas)

Data was formatted to have "partners" and "guests" entries, both
of which contribute to personas.

To avoid some post-processing of data in JS, it's best to format
data to immediately include type of persona.

2. include "guestAuthor" in "author" data of message

Discuss models in JS group partners and guests into a single model
Persona, to make feature works regardless on whether user is
authenticated or not.

This commit simplifies code by removing data guestAuthor in message
formatted data, and instead author contains author data in all cases,
whether the author is a partner or guest.

3. simplify insert (remove id, redundant with preinsert)

Also rename Follower.isActive to Follower.is_active, for
even simpler Follower.insert()

closes odoo/odoo#137276

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-04 19:40:19 +00:00
Michael (mcm) 2fbc08a197 [IMP] *: remove legacy service mappers
This commit removes the legacy service mappers which are useless now.

closes odoo/odoo#136807

Task: 3439226
Related: odoo/enterprise#48015
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-10-04 19:40:16 +00:00
Didier (did) f29a09d7d3 [IMP] mail: send channel update to the client
Before this PR, channel update were not sent via bus notifications.

Part of task-2821415

closes odoo/odoo#136623

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-04 19:40:14 +00:00
Aaron Bohy cc3a3a328d [REF] web,*: simplify arch manipulation and parsing logic
*board,mail,project

This commit aims to simplify the XMLParser logic and the way archs
are manipulated in views, motivated by [1] where we had to
modify the arch in View to insert access right information.

First, the xml utils have been reworked. The XMLParser class has
been removed. The xml utils module already exported a parseXML and
a serializeXML functions, this commit adds visitXML, s.t. the whole
XMLParser feature is fully replaced by the 3 functions.

Second, concrete views now receive the arch in props as an
XMLDocument, as the arch is parsed once for all in View. With this,
we were able to remove serializing/parsing back and forth at several
places, where we needed to extract information for sub-parts of an
arch individually (e.g. View, x2many subviews, list view groupby).

Third, even though this change has been driven by the one above and
wasn't initally wanted, the view compiler cache and API have been
simplified. The cache is now flat, there's an entry in the cache for
each template that has been compiled. Moreover, the useViewCompiler
hook no longer takes the cache key in params, as it can directly
compute it itself (the key being the outerHTML of the template).

[1] odoo/odoo#135145

closes odoo/odoo#136376

Related: odoo/enterprise#47808
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-10-04 08:39:12 +00:00
Alexandre Kühn e4b7217fc3 [FIX] mail: remove message reaction was not working
Follow-up PR of https://github.com/odoo/odoo/pull/136308

Commit above simplified code in discuss models so code applies
on records than properties on records. For example, instead of
juggling between persona local id and persona, some code can simply
keep logic on persona without leaking local id.

However the improvements are iterative, and more improvements are
needed to stop using local id. Some code still need local ids.
Commit above mistakenly converts a local id to persona on some code
that still work in terms of local id. As a result, message reactions
were not working properly, notably when adding a new reaction using
click on an existing message reaction of someone else.

There was also a bug in implementation in mock server which made the
test not working. This commit fixes this issue too.

Task-3523101

closes odoo/odoo#136940

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-03 22:11:52 +00:00
Thibault Delavallée 83c7d8179a [FIX] mail: fix author browse in web push payload computation
There is a double list encoding, probably not required. Coming from mail
enterprise code move.

closes odoo/odoo#137451

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-03 21:14:46 +00:00
Alexandre Kühn 9a70545913 [REF] mail: support passing commands as data of relational field
This significantly eases processing command data on relational field
received from server.

closes odoo/odoo#137341

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-03 20:17:47 +00:00
Alexandre Kühn 3b251d6d66 [REF] mail: turn Composer.rawMentions into relational fields
This field contained 2 sets with partner and channel ids.
It's easier and safer to reason in terms of records rather
than properties on records.

Part-of: odoo/odoo#137341
2023-10-03 20:17:47 +00:00
Jorge Pinna Puissant 006ee1fc47 [REF] web, *: remove legacy cookie utils and cookie service
The cookie service was replaced by a utils file in core. This was done
to be able to use the cookies without the need of environment.

"Om Nom Nom Nom" - Cookie Monster

part-of task-id 3439226

closes odoo/odoo#136782

Related: odoo/enterprise#48005
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-03 20:17:40 +00:00
tsm-odoo bd4e418fc1 [IMP] im_livechat, mail: allow CORS livechat actions
This PR makes several actions available for the embed livechat
such as:
- calls
- message edition
- message reactions
- link previews

task-3523930

closes odoo/odoo#136618

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-03 19:20:10 +00:00
Didier (did) 8fa2a6fe11 [IMP] mail: search a discuss thread
See https://github.com/odoo/enterprise/pull/43980

task-2359037

closes odoo/odoo#118794

Related: odoo/enterprise#43980
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-03 19:19:50 +00:00
Alexandre Kühn b526078ae9 [REF] mail: set data immediately on discuss model relational field
With this commit, instead of `Record.insert()` before setting
relation with records, we can immediately pass record data.
For example:
```js
message.author = { id: 3, type: "partner", name: "Admin" };
thread.messages.add({ id: 10, body: "some-text-content" })
```

This is supported on all relational fields that define a target
model.

To make this work while drastically avoiding cyclic dependencies
in code, whenever data have to be inserted in relation, they are
pre-inserted with essential data, and then they are fully inserted
after being registered in the relation.

closes odoo/odoo#136539

Related: odoo/enterprise#47854
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-02 11:42:55 +00:00
Alexandre Kühn 485bcb82bf [REF] mail: make store service a model
This simplifies managing relations on the store, and gives
incentive to define them there instead of another prop that
is a record, e.g. `discuss`.

Part-of: odoo/odoo#136539
2023-10-02 11:42:55 +00:00
Thibault Delavallée 42958e2f5e [IMP] base, mail, sms: directly limit available models depending on usage
Add a computed m2m field giving allowed models for the action. It allows to
avoid choosing the wrong models when designing server actions.

Remove a test that has no use: it checks a model_id field is available on
server action view while we don't want to display it as it is imposed by
the rule itself.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée 5462b30b4f [FIX] mail, sms: fix {mail/sms}-specific server actions model check
Effectively check that mail-specific server action types are triggered only
on mail-enabled models that are not transient.

Check that mail and sms templates models match their action model by adding
constraints.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée 5f0d3e805c [FIX] mail: fix activity-based server actions summary computation
Summary should be taken from activity types when possible.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée b05e7e4da0 [FIX] base, mail, sms: fix server actions naming computation
Fix name compute method:

  * correctly call super in batch;
  * correctly filter records;
  * remove dependency on context key (which was missing in triggers);

In this commit we also consider the name update should always be done even
outside of automated rules context. Having a whole compute method relying
on a context key does not makes sense. As server actions are technical
records, having the name always being correctly updated is better.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée 2f9d5258fb [FIX] mail: translate server action names
Following the recent server action refactoring, it seems translations have been
forgotten in the review process.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Rémy Voet (ryv) afef0b390f [FIX] mail: allow searching on message_partner_ids for portal
Because we now check groups in the domain, some searches raise
`AccessError` when using `message_partner_ids` in the domain for the
portal user:
- https://github.com/odoo/odoo/blob/4d1a1f1c99d6055b60921ce464b72f0f4d9bbfe2/addons/sale/controllers/portal.py#L35
- https://github.com/odoo/odoo/blob/4d1a1f1c99d6055b60921ce464b72f0f4d9bbfe2/addons/sale/controllers/portal.py#L41
- https://github.com/odoo/odoo/blob/ba1a5509fa49fd846739252d16083dd8cb334b53/addons/website_forum/models/forum_post.py#L831
- https://github.com/odoo/odoo/blob/86b43bcfa6c9a5b6ac1b3ac9ba0c308f1169ea3b/addons/hr_timesheet/models/hr_timesheet.py#L41

Since there are many invalid domains and it is impossible to sudo only
part of the domain, it is easier to override `_flush_search` to allow
`message_partner_ids` in search domain leafs with some restriction.

closes odoo/odoo#135111

Related: odoo/enterprise#47822
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-29 14:48:09 +00:00
miad-odoo f608bce9b8 [IMP] mail: prevent saving template when no model
With this commit, we now raise a UserError if a user tries to save a template
with a composer that has no attached model.

Task-2504439

Part-of: odoo/odoo#126049
2023-09-29 13:11:50 +00:00
miad-odoo 39dd2fc2ab [IMP] mail: allow users to manage own templates
Before this commit, all mail templates were shared, which was cluttering the UI
for everyone.

Now, each user can have their own templates that they can edit and save. Access
is done through the mail composer wizard, where users can only access their own
templates and templates that don't belong to anyone.

Some groups are considered as admins and can access all templates in
Settings/Technical/Email/Email Templates:

- Sales Admin
- Project Admins
- Helpdesk Admins
- Accountants
- Event Admins
- Recruitment Admins

Task-2504439

Part-of: odoo/odoo#126049
2023-09-29 13:11:50 +00:00
Thibault Delavallée 0b5f8a85a1 [FIX] mail: fix alias values given when copying records
Copy calls 'create' on 'self' which means self is not a void recordset. In
mail this causes issues as it may have an impact of values generated for
aliases, which depends on 'self' when calling '_alias_get_creation_values'.

Followup of odoo/odoo#130632

Prepares Task-36879 (Mail: Support MultiCompany Aliases)

closes odoo/odoo#136968

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-28 20:16:54 +00:00
Thibault Delavallée 3351e891dc [FIX] mail: fix call to super of '_get_default_bounce_address'
It was calling super of another method. But as the base code (located in
base/ir_mail_server) is the same, the result is actually the same.

Followup of odoo/odoo#130750

Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#136968
2023-09-28 20:16:54 +00:00
Sébastien Theys 64c6f731cb [FIX] mail: ignore obsolete chat window state received from bus
This fixes flickers in situations where:
- close (manually): notify
- open (manually): notify
- close (from bus)
- open (from bus)
The final state is correct, but it does one extra close and open.

With this fix, it becomes
- close (manually): notify
- open (manually): notify
- (close from bus ignored)
- (open from bus ignored)

Note: the fix is aimed towards fixing issues within the tab making the
manual change, which is the most common use case. Other tabs are not
considered visible at the time of the change, making the flicker
irrelevant, which is convenient to ignore as fixing it would require
more advanced mechanism.

runbot-24379
runbot-24994

closes odoo/odoo#136698

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-28 01:51:38 +00:00
Sébastien Theys cbfb1b909c [FIX] mail: do not notify chat window state when received from bus
The server is supposedly already aware of changes that are coming from
itself, it doesn't need to be notified again.

This prevents each extra open tab from making useless RPC.

This also fixes race conditions in situations where:
- close (manually): notify
- open (manually): notify
- close (from bus): notify close again <--- this is the bug
- open (from bus): already no notify for open from bus (ok)
- close (from bus again): and notify close yet again
Final state is close, whereas the user manually set open last.

With the fix, it becomes:
- close (manually): notify
- open (manually): notify
- close (from bus)
- open (from bus)
Finally state is open as expected, no extra RPC.

Note that is this example, there is still a problem, where an obsolete
value from the server (the first close from the bus) will overwrite the
newer local state (open), causing a potential flicker. This will be
fixed in a future commit.

runbot-24379
runbot-24994

Part-of: odoo/odoo#136698
2023-09-28 01:51:38 +00:00
Sébastien Theys 89aaa2c9ef [FIX] mail: restore lost pending new message when thread is loading
Part-of: odoo/odoo#136698
2023-09-28 01:51:38 +00:00
Didier (did) 6eaf6f23b4 [FIX] mail: do not display recipients when using log note
In log note case, followers are not going to be notified of the message.
Therefore the recipients input should not be visible.

task-3504225

closes odoo/odoo#136661

X-original-commit: c60449a2efde457e8370928681f011c103ea1d60
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-09-28 01:51:29 +00:00
Sébastien Theys 635762db77 [REF] web, mail, snailmail: tests: merge containsMulti into contains
closes odoo/odoo#136658

Related: odoo/enterprise#47913
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-28 01:51:27 +00:00
Julien Castiaux 2ba215729b [FIX] mass_mailing: add test for emoji widget
Go to the form view of mailing.mailing, write "hello " as the subject,
insert an emoji, you end up with "hello:)" instead of "hello :)". The
problem is that when the input loose the focus, it is automatically
trim.

Reconfigure the `char_emojis` widget so that is doesn't trim.

task-id-3493168

closes odoo/odoo#136530

X-original-commit: 2adda1eb2760ccf970761f424105e245afc3de3f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-09-27 17:41:03 +00:00
Alexandre Kühn 98491e3b43 [REF] mail: store all discuss models in Record.records as object
In preparation to improve insert in relational field with data, so
that there's less risk for cyclic code execution (hint: there'll be
a preinsert).

closes odoo/odoo#136308

Related: odoo/enterprise#47777
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-27 13:11:58 +00:00
Alexandre Kühn bef4069195 [IMP] mail: introduce RecordList.add() in discuss model relations
This method pushes the provided record if it's not in the record
list, otherwise it does nothing. This works a bit like `add()` on
Sets.

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 22ed4ec268 [REF] mail: rename commands in discuss model data
Relational data in server formatter are:
- for one relation: None/false or object
- for many relations: list of objects or list of commands

The commands were:
- 'insert': to add a new item in a relational field
- 'unlink': to remove an item from a relational field
- 'insert-and-unlink': to remove an item from a relational field
- 'clear': to remove all items from relational field

There was a slight nuance between 'unlink' and 'insert-and-unlink'
at some point, but it becomes irrelevant with current code of model.
The name of the commands were hard to grasp what they actually mean
for the many relations.

This commit improves it by renaming 'insert' by 'ADD' and the 2
'unlink' commands by 'DELETE'. This makes it more apparent that
the data in 'ADD' refers to data of record to add in the relation,
while 'DELETE' refers to data of record to delete from the relation.
The 'clear' has been replaced by `False` value instead of a command.

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 8d78065886 [REF] mail: turn Thread.transientMessages into relational field
Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 87f605aa90 [REF] mail: turn 'store.ringingThreads' into relational field
Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 08c751a9e3 [REF] mail: turn Thread.rtcSessions into relational field
Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 1af1b3e96a [REF] mail: remove unnecessary getters in thread
Also turn `invitedMembers` into relational field

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn d97ffb0dde [REF] mail, *: turn store.discuss into a model
This allows to define categories as also models, which allow
to register list of threads as relational fields, which in turn
simplify code readability and maintainability of these relational
data.

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 603cd70ecc [REF] mail: move service.update() to discuss models
These `update()` functions are specific to a discuss record,
so it's best to be defined in the model rather than another
service.

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Sébastien Theys aee3cb8929 [REF] mail, *: tests: remove last occurences of jQuery in contains()
* = im_livechat, project_todo, test_mail, web

closes odoo/odoo#136425

Related: odoo/enterprise#47825
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-27 07:28:08 +00:00
Nasreddin Boulif (bon) 1f7d650da5 [FIX] mail: set name with default name instead of email
Steps to reproduce:

  - Install `website_crm` module (for test purpose)
  - Go to `Contact Us` page on website
  - Edit the page
  - Change the submit button to create an opportunity instead, then save
  - Fill the form and save
  - Go back to CRM app and open the opportunity just created
  - In the chatter, try to send a message
  - Click on the checkbox of the suggested recipient (to enable it)

Issue:

  - Email is displayed twice in the suggested recipients before click
    (instead of name + email or just email if same as name)
  - Email is set as default name in the opened dialog

Cause:

  - Displaying email even if same as name
  - Not setting the fields with default values (received from
    `/mail/thread/data` rpc call)

Solution:

  - Don't display email if same as name
  - For the suggested recipient label (next checkbox) : set name with
    default name value if name parsed from mail is same value as email
  - For the default values in the opened dialog: set default values with
    defaults received from `/mail/thread/data` rpc call

opw-3470295

closes odoo/odoo#135951

X-original-commit: 02ef0425a1f4ae30d846f6c57489cdebc3b4bbad
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-09-27 03:58:34 +00:00
Raphael Collet 758780c03b [IMP] core: remove parameter 'extra' from Query.join() and Query.left_join()
Part-of: odoo/odoo#134677
2023-09-27 03:01:45 +00:00
Julien Carion (juca) 2a2f53f7ce [FIX] web: fix translations for duplicate records
This commit ensures that changes in translated fields on a freshly
duplicated record will apply to all translation even when the user
language is not en_US.

Steps to reproduce:

-go to accounting -> configuration -> taxes in other language than en_US
-open any record in form view
-duplicate the record
-change the name of the record and save
-ensure that the name is the same in all languages

task-3339736

closes odoo/odoo#134481

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-27 01:50:52 +00:00
Brieuc-brd f5d1669ea8 [FIX] web: adapt the form view to large screens
Prior to this commit, there was a spacing issue in large screens (eg. 4K
screen), the form view wasn't large enough and this created a big gap
between the form view and the chatter.

This commit adapts the form view to large screens.

task-3453381
Part of task-3326263

closes odoo/odoo#136454

X-original-commit: 1a995cad898283f6909506ba43d1692381b3d6ef
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-09-25 15:20:23 +00:00
Julien Carion (juca) bbc4de86d9 [IMP] web: list many2oneAvatar should not be a link
This commit changes the canOpen prop of the many2oneAvatar field to be
set to true only when in form view. The field will therefore stop being
a link in readonly when outside of form view.

closes odoo/odoo#136118

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-09-25 11:30:11 +00:00
Sébastien Theys 7a90938a70 [REF] mail, *: tests: simplify text option of contains
* = bus, calendar, im_livechat, hr, project_todo, sms, snailmail,
    test_mail, web, website_livechat

The current implementation often led to tests relying on DOM structure
to properly target the correct element with the text.

It is now easier to simply check if a parent contains some text.

closes odoo/odoo#136295

Related: odoo/enterprise#47770
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-23 10:33:04 +00:00
Thibault Delavallée eb228ac373 [FIX] test_mail: prepare and fixup tests for alias domains
Some tests are updated to lessen diff in future tests, especially about
aliases. Some tests are fixed as they are somehow incorrect (notably
in gateway testing) but currently passing as mail gateway is quite
permissive.

Add some tests preparing MC / alias domains configuration notably about
company / alias synchronization, which is currently only based on config
parameters.

Also update some tests by using fstrings which are generally more readable.

Finally move some tests to their right file / main testing class to keep
them ordered by main topic.

Prepares Task-36879 (Mail: Support MultiCompany Aliases)

closes odoo/odoo#136318

X-original-commit: odoo/odoo@c18300e225
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-22 18:40:25 +00:00