Commit Graph
127 Commits
Author SHA1 Message Date
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
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
tsm-odoo df57ab6221 [IMP] im_livechat: restrict operator assignation during call
This PR changes the operator allocation algorithm so that operators
in a call with already two ongoing chats are not prioritized over
more occupied operators that are not in a call.

part of task-2900771

closes odoo/odoo#135113

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-29 17:15:39 +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 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
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
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
Julien Carion (juca) 1a44537095 [IMP] mail: avatar card preview v2
This commit changes the behavior of the avatar card preview so that it
is now triggered on click instead of on hover and the previous behavior
of the click event (open chat) is therefore removed. It also adds the
functionality to the Message and Activity components of discuss so that
clicking on the avatar inside these components will also show the card.
It also makes sure that the id of the user is added to the persona even
if nothing indicates that it should.

task-3442819

closes odoo/odoo#131355

Related: odoo/enterprise#47084
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-09-15 16:45:50 +00:00
Sébastien Theys 7ea370fce7 [REF] mail, *: tests: refactor contains to further remove jQuery
* = account, base_iban, bus, calendar, crm_livechat, hr, hr_holidays,
    im_livechat, mrp, project, sms, snailmail, test_mail,
    test_mail_full, web, website_livechat, website_slides

Add support in `contains` for most operations that we use in tests.
Remove return value from `contains`.
Move into `web` module.
Remove import/export chains, directly import from correct module.

closes odoo/odoo#134652

Related: odoo/enterprise#47064
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-14 11:22:47 +00:00
tsm-odoo 4be75dd002 [IMP] im_livechat: allow visitors to receive calls
task-2900771

closes odoo/odoo#135109

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-13 03:37:56 +00:00
tsm-odoo 278f9081f2 [IMP] im_livechat: add message features for livechat
This commit adds the discuss message features to the livechat
threads:
- Edition/deletion of messages
- Reactions
- Replies

It also improves the history view present in the channel form view
by showing replies.

task-2742676

closes odoo/odoo#133456

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-08 13:45:33 +00:00
tsm-odoo a188d9c894 [IMP] im_livechat, *: use guests for livechat visitors
*: crm_livechat, mail, test_discuss_full, website_livechat.

part of task-3332628

closes odoo/odoo#129770

Related: odoo/enterprise#45767
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-09-07 13:10:07 +00:00
tsm-odoo d9f0723548 [IMP] im_livechat, *: show livechat button after closing chat
Before this commit, the livechat button was not shown anymore after
closing the chat window. Since the livechat button is always present
from now on, the button is now draggable.

task-3358161

closes odoo/odoo#134513

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 16:19:53 +00:00
Sébastien Theys e3b774118b [REF] mail, *: tests: remove most remaining afterNextRender
* = base_iban, bus, calendar, crm_livechat, im_livechat

Follow up of https://github.com/odoo/odoo/pull/130451

`contains` is faster and functionally more significant.

Part-of: odoo/odoo#134025
2023-09-04 21:53:37 +00:00
divy-odoo cea1cab535 [FIX] *: resolve the last tour step warnings
When we haven't provided a custom action, the tour step runs the default
action. In the final step of the tour, when there is no `run` or
`isCheck` provided, It shows warnings of 'ignoring action (auto) of last
step' as it can lead to a race condition.

This commit resolves the warnings: `ignoring action (auto) of last step`

task-3429500

closes odoo/odoo#129239

Related: odoo/enterprise#46683
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-09-04 15:02:47 +00:00
Sébastien Theys 811f159f18 [REF] mail, *: tests: replace remaining jQuery text() occurrences
* = im_livechat, snailmail, test_mail, website_livechat

And also `innerText`.

closes odoo/odoo#133717

Related: odoo/enterprise#46603
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-01 13:21:01 +00:00
Sébastien Theys 3ce461cc51 [REF] mail, *: move contains count to named parameter
* = calendar, hr, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail

The parameter is too often specified with its default value to be worth
being a positional parameter.

Part-of: odoo/odoo#133717
2023-09-01 13:21:01 +00:00
Sébastien Theys 78897c1890 [REF] mail, *: tests: use native code for most contains/text
* = calendar, im_livechat, project_todo, sms, snailmail, test_mail,
    website_slides

The choice was made to have "trimmed text" check rather than "contains"
to have more robust tests, at the cost of slightly more effort to write
complete and unique asserts.

There is no direct speed improvement from this one, but it is one step
closer to removing jQuery.

Moreover, it will fix infinite loops in some situations, because jQuery
selectors would write attributes on the body, which would trigger the
mutation observer, which itself will call the selector again.

Part-of: odoo/odoo#133717
2023-09-01 13:21:01 +00:00
Sébastien Theys a7485e53d6 [REF] mail, *: clean click and contains API
* = test_mail, hr, im_livechat

- Allow only selectors
- Add `value` check to `contains`
- Remove return from `click`

closes odoo/odoo#132799

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 17:40:07 +02:00
Sébastien Theys ed7621d726 [REF] mail, *: remove unnecessary makeFakeNotificationService
* = hr, im_livechat

The real service works just as well, gives more guarantee on what is
actually tested, and requires less lines of code.

closes odoo/odoo#132744

Related: odoo/enterprise#46108
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-22 20:01:17 +02:00
Sébastien Theys d08a18b791 [IMP] mail, *: tests: use contains in click and insertText
* = account, calendar, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail, web, website_livechat

`contains` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

closes odoo/odoo#130451

Related: odoo/enterprise#44999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-21 21:00:03 +02:00
Sébastien Theys 9a1efcbde7 [REF] mail, im_livechat, mrp: rename waitUntil to contains
`await contains` is shorter and reads better than `await waitUntil`.

Part-of: odoo/odoo#130451
2023-08-21 21:00:02 +02:00
Sébastien Theys 3f8544d906 [IMP] mail, im_livechat: tests: add assert to waitUntil
`QUnit` tests require at least one `assert`. This change allows to write
tests that only contain `waitUntil` without extra `assert` in the test.

`waitUntil` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

Currently existing tests that contain `waitUntil` have been adapted
accordingly. More and more tests should make use of it in the future.

Part-of: odoo/odoo#130451
2023-08-21 21:00:00 +02:00
tsm-odoo 01fa22e0c9 [FIX] mail, *: fix suggestions after search/fetch returned no result
*: im_livechat.

Before this commit, suggestions were not showing anymore after
search/fetch returned no results. This commit fixes the issue
by resetting the search state when nothing is found.

task-3459933/3455060

closes odoo/odoo#132264

X-original-commit: 13b3f36a0d71bb55e2ca56fd207c7dfaba23aa86
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-18 21:45:11 +02:00
tsm-odoo 7131f7c626 [IMP] mail, *: add support for guests/dynamic users in tests
*: bus, calendar, im_livechat, web, website_livechat.

This PR adds the possibility to set the current user during tests as
well as the mail guest. This will be used to test mail guest page and
livechat once the visitors will be treated as guests.

part of task-3332628

closes odoo/odoo#130811

Related: odoo/enterprise#45331
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-09 14:36:12 +02:00
tsm-odoo 7fcf33189e [FIX] im_livechat: fix livechat session state
Before this commit, the fold state, seen message id and message unread counter
was never saved on the livechat session state. This is due to an incorrect check
on the session state. We wan't to ensure the session is not closed when writing
such information but the state was checked on the thread instead of the livechat
service.

closes odoo/odoo#131049

X-original-commit: a81208d980a2a30bcff6382729e2ed8369e6a65d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-07 19:58:19 +02:00
tsm-odoo 7c932aa6c8 [FIX] im_livechat: use public user during tests instead of admin
Before this PR, the user during livechat embed tests was the admin partner while
it should be the public partner. This commit fixes the issue.

part of task-3332628

closes odoo/odoo#130429

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-03 10:43:01 +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
Didier (did) 93f134d640 [FIX] im_livechat: reintroduce history command
task-3435244

closes odoo/odoo#130362

X-original-commit: 2e834a8439cc260c25d95233492df13e9b77c2de
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-02 13:20:34 +02:00
Sébastien Theys f9aedceb9f [REF] mail, im_livechat, *: move code and remove patches from sidebar
* = hr_holidays

Part of task-3265211

closes odoo/odoo#130003

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-01 22:30:47 +02:00
tsm-odoo 577f0b3471 [IMP] mail, *: remove setup manager patches in test
*: im_livechat, website_livechat.

Before this PR, services has to be added to the setup manager in order to be loaded in tests. This was cumbersome because the setup manager was patched by each sub-feature to add feature related services to the registry. The same had to be done for systray/main components registries.

This PR automates this process in order to remove the patches.

closes odoo/odoo#129705

Related: odoo/enterprise#44596
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-28 16:28:52 +02:00
Sébastien Theys 704d37b0de [REF] im_livechat: remove messaging service patch
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:31 +02:00
tsm-odoo 405a3a4d62 [IMP] im_livechat, mail: add user from member list
This PR focuses on partner invitations for livechat channels:
- Add "invite a user" button to the member list
- Sort partners by availibility (partner is a livechat operator
and connected) then most invited users (by the current partner)
- Display partner lang of suggested partners

part of task-3332872

closes odoo/odoo#128834

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-26 12:00:22 +02:00
tsm-odoo 7ab24685e2 [FIX] im_livechat: reset livechat when session cannot be persisted
Before this PR, failing to persist a livechat thread would
stuck the livechat session in an incoherent state, preventing
the user to open a livechat. This PR ensures the thread service
does not write anything if there is no session.

closes odoo/odoo#129699

X-original-commit: d4e8b62fa8f008cd4ab7d69e413115cb35a6ac33
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-26 06:56:13 +02:00
Pierre Pulinckx (pipu) 8bfa76a842 [REF] *: Unify _t and _lt
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.

In this commit,

the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.

Example :

registry.category("web_tour.tours").add("example", {
    test: true,
    steps: () => [
        {...},
        {...},
    ],
});

task-3292454

closes odoo/odoo#124157

Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-07-19 13:13:16 +02:00
Alexandre Kühn 8ed39b9244 [FIX] mail, im_livechat: show livechats in livechat tab in mobile
Before this commit, livechats in mobile were shown in the "Chat"
tab in both discuss app and messaging menu. This is alright, but
there's a dedicated tab for "Livechat", which was empty as a result.

The intended showing in mobile is to keep livechat away from "Chat",
and instead populate the "Livechat" filter.

Task-3430253

closes odoo/odoo#128934

X-original-commit: cf4b72582bbb52c7cd4bc17733f4dbbc84f9b321
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-19 01:54:28 +02:00
tsm-odoo 406b8a4896 [FIX] im_livechat: keep same livechat name after inviting members
Before this commit, inviting a channel member to a livechat channel
would change its name. This is not what we want as the thread name
should always be the one of the visitor (e.g. "Visitor 20", task-3332872).

Steps to reproduce:
- Open two tabs, one with admin log, one on the support page
- Click on the livechat button and send a message from the support page
- Invite a member with the admin tab
- The name of the thread changed.

closes odoo/odoo#128238

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-15 04:01:17 +02:00
tsm-odoo 7be977af4d [FIX] im_livechat, mail: fix add member to livechat channel
Before this commit, inviting a partner to a livechat channel
had no effect. This commit solves this issue.

Steps to reproduce:
- Go to a livechat channel in the discuss app
- Click on invite a member on the top right corner
- Select a member
- Click on the invite button
- Nothing happens

closes odoo/odoo#128173

X-original-commit: 94086d9289222008f59a97611a80de4e1310e41c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-13 02:21:53 +02:00
Alexandre Kühn f64c40d677 [FIX] im_livechat: open profile on clicking on avatar in livechat
Before this commit, when clicking on avatar of author of an
authenticated visitor in a livechat, it was opening the chat with
this user.

The intended behaviour is to show the profile, as it's quite useful
for livechat. Opening a DM chat is useless, because the livechat
already represents a chat with the person

closes odoo/odoo#127615

X-original-commit: 4eedc234fe19ab681c6a35c2265e9763b2a80760
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-07 12:10:00 +02:00
Alexandre Kühn e228acb081 [REV] mail: debounce suggestion (and channel selector) searches
This reverts odoo#126869.

Motivation for debounce was to reduce the amount of RPCs, to
not put too much load on server.

However, this makes showing of mention slower than it should,
and the load on server is already adjusted based on duration
of ongoing `fetchSuggestion` RPC: if server can reply with mentions
immediately, then no need to debounce. If the RPC is slow, then
next `fetchSuggestion` waits for current RPC to finish before
making a new fetch.

This PR also fixes this small crash when using mentions:

```
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at cleanTerm (format.js:244:1) (/mail/static/src/utils/format.js:244)
```

Steps to reproduce:
- type `@` then `backspace` then `@` then `backspace`, etc.

This happened because suggestion hook internal state had `term` being undefined when there is no term, but `undefined` is invalid for `cleanTerm`. `""` is a better default for no search term, and since this is a string this works with `cleanTerm`.

closes odoo/odoo#127399

Related: odoo/enterprise#43678
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-05 18:46:42 +02:00
Sanjay-Sharma 4f6a92e684 [IMP] web_editor: add emoji picker in web editor
Purpose:

This commit adds Emoji_picker functionality to the web_editor,
allowing users to conveniently add emojis to their text and
improving the overall user experience.

Specifications:

Now we can insert emoji in web_editor using `/emoji`.

Task id: 3253958

closes odoo/odoo#125137

Related: odoo/enterprise#42772
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2023-07-05 11:37:06 +02:00
Alexandre Kühn 987eeef710 [FIX] mail: debounce suggestion (and channel selector) searches
Before this commit, fetching suggestions (e.g. channel selector
in discuss sidebar "Find or create a channel", or `@`-mentions)
were performing RPCs on each user input, resulting in wasted
network and server load.

This commit fixes the issue by debouncing the fetching of
suggestions to 0.5 sec.

closes odoo/odoo#126952

X-original-commit: 6770ac3
Related: odoo/enterprise#43502
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-04 03:43:48 +02:00
Louis Wicket (wil) ce07b37111 [IMP] mail: make channel_info private
Make `channel_info` private so that it is no longer exposed to RPCs.

closes odoo/odoo#127078

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-04 00:51:54 +02:00
tsm-odoo 7ec8d66ce4 [IMP] im_livechat: improve livechat channel kanban
This PR improves livechat channel kanban:
- Remove image field (always the same and does not bring value)
- Replace the count of operators by the many2many_avatars widget with connected users
- Join button as secondary button, Leave button color should be primary
- Add options from channel card: Ratings + configure
- Compute ratings based on last 2 weeks on channel's card
- Highlight active channels (at least one operator)

part of task-3332872

closes odoo/odoo#125769

Related: odoo/enterprise#42852
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-03 21:55:56 +02:00
Zelong Lin a0aa45ce00 [IMP] mail: chat window dropdown actions from avatar & name
Before this commit, chat window actions were all placed in
the right part of header. It was showing the main action (call),
close action, and all other actions in dropdown menu from
the "..." (more) button.

This commit now replaces the "..." (more) button by clicking
on avatar/name of conversation. The "..." (more) button has been
replaced to "_" (minimize/fold) button, as clicking on header to
open/fold chat window can become hard due to avatar + name being
clickable to show most chat window actions.

This commit also adds the following actions in chat window:
- Open (Employee) Profile
- Rename (conversation)

Task-3336752

closes odoo/odoo#124592

Related: odoo/enterprise#42480
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-29 19:54:38 +02:00
tsm-odoo 9beb4668ca [IMP] im_livechat: improve feedback messages
This PR improve feedback messages:
- Visitor has left the conversation: as note
- Rating message: as note
- Rating message: Use same emojis as for customer
- Rating reason in same message as the emoji, without writing "reason"
- Feedback done in 1 rpc instead of 3

part of task-3332872

closes odoo/odoo#125925

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-29 18:20:25 +02:00
tsm-odoo dc77bee17e [IMP] im_livechat: go to oldest unread thread with tab
This PR adds the possibility to go the oldest unread livechat
thread when pressing tab on an empty composer.

part of task-3332872

closes odoo/odoo#125922

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-06-26 20:01:04 +02:00
Julien Mougenot 23e0ac2a1a [IMP] web: Support pointer events in draggable
This commit:

- adds a "delay" parameter to the `draggable_hook_builder`, waiting for
that delay on pointer down events before triggering the drag sequence
(making it possible to use "long mousedown" events);

- changes the event detection in `draggable_hook_builder` to listen
for pointer events instead of mouse events, effectively supporting the
drag and drop feature on touch devices;

- adapts the test helpers (with some refactors to `triggerEvent` and
other utility functions) to make them use pointer events instead for
drags and drops;

- adapts the tour utils to use a tone-downed version of the refactored
test utils `dragAndDrop` function;

- also changes events in list view which does not yet uses the draggable
hook, but should still work with the same helpers in tests.

Part-of: odoo/odoo#116005
2023-06-22 15:40:43 +02:00
Alexandre Kühn 1d42692cfd [IMP] mail: improve discuss counter style
To match the visual of the messaging menu badge for its counter.

Task-3345133

closes odoo/odoo#122946

Related: odoo/enterprise#42493
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-13 19:28:59 +02:00
Sébastien Theys 9dba4e0d77 [REF] mail, *: reorganize JS files
Remove "fake" feature sub-folders that make files harder to find.

Note: If there are too many files in the main folder now, a new split
that actually makes sense can be done at a later time: this would not
just be code move, but removing coupling between said feature and the
rest of the code.

Apply consistent structure, where the top level folder is a feature (or
core), and sub-folders are subdivision of the feature depending on
context (closely related to assets bundles).

```
- core
    - common
    - public
    - web
- feature
    - common
    - public
    - web
```

The opportunity is taken to reorganize the top of the files and imports:
- Always use absolute path in imports to be able to find all usages of a
  file with a single search.
- Reorganize imports to group them by module, and to sort them
  alphabetically by path/feature.
- Always use single asterisk (*) for `odoo-module`: less characters yay!
  And double asterisk should be used for JSDoc comments, not for custom
  instructions.

Part of task-3265211

closes odoo/odoo#124168

Related: odoo/enterprise#42121
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-08 21:52:44 +02:00