Commit Graph
5112 Commits
Author SHA1 Message Date
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
Zelong Lin adc5448adf [IMP] mail: single unified Picker (Gif & Emoji)
Before this commit, emoji and gif pickers were handled as 2 different
pickers. They had dedicated buttons. This made composer quite
bloated, especially in chat windows were size is narrow.
Also the pickers were always displayed as popover, which is not the
best way to show content in mobile.

This commit improves those pickers in discuss so that only a single
button is present (emoji button). Clicking on this button shows a
picker that groups the emoji and gif picker, both of which can be
selected in the header of the grouped picker.

In mobile, instead of showing a popover, it now shows the grouped
picker below the composer. This makes it show where the soft keyboard
is present in mobile, making it easier to input emojis or gifs on
those devices.

This commit also added slight style changes to both pickers. Notably,
the search bar has an improved style that makes it look good when
next to the composer text input, especially in mobile layout.

task-3015707

closes odoo/odoo#123671

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-08 12:24:45 +00:00
Alexandre Kühn 27919caad7 [FIX] mail: auto-close attachment box when no attachments
Before this commit, when opening a record with some attachments
and attachment box is open, switching to a record without any
attachment shows the attachment box open.

This is a problem because the attachment box is designed to only
be open when there are some attachments. The toggler for showing
attachment box is instead an "upload file" button when the record
has no attachment. This means that the open attachment box in those
records without any attachment cannot be toggled off.

This commit fixes the issue by automatically closing attachment box
when the record has no attachments.

Task-3493374

closes odoo/odoo#134771

X-original-commit: ab678ea7618ca1aee5a6ab31b2de59c87fcce32c
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-08 09:47:09 +00:00
Alexandre Kühn d139240161 [FIX] mail: search in emoji picker should scroll top
Before this commit, when opening emoji picker and scrolling down
then making search, the scroll position was not reset to top.

This gave the impression that the search was incorrect, because
the most likely desired emoji is at the very top but was not visible
when searching in this condition.

This commit fixes the issue by enforcing scrolling top in emoji
picker content when the search term is updated.

Task-3493611

closes odoo/odoo#134675

X-original-commit: 7999ae51c51e24eea15edb8f08b2e35db4a774ad
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-08 08:29:59 +00:00
Didier (did) 8a6eda2ccd [IMP] mail: add typing status above the composer in chat window
In DM chat, the im status turns into typing icon so it was not
a problem. In group chat and channel, however, there was no way
to see typing members in chat window.

This commit adds explicit small text above composer in chat window
to list typing members of conversation.

Task-3474778

closes odoo/odoo#133757

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-08 08:29:54 +00:00
Maximilien (malb) d6d468e5f1 [IMP] hr_expense: readability expense receipts
The goal of this PR is to improve the readability of expense receipts on
hr_expense and hr_expense_sheet.
This PR do the following:
- Add the expense name next to the filename
- Vertically center the receipt on both model (was previously done in hr_expense
 but not for the sheet)
- Make sure the title doesn't get hidden by the image (was previously done in
hr_expense but not for the sheet)

Also, to achieve the first point we had to modify the attachment so that we can
retrieve easily the information of which line the attachment is attached.

closes odoo/odoo#130181

Task: 3443067
Signed-off-by: William André (wan) <wan@odoo.com>
2023-09-07 16:16:04 +00:00
Didier (did) 8bd1d87880 [IMP] mail: allow scroll using keyboard key in chat window
Before this PR, it was not possible to scroll a chat window using page down/page
up, home or end keys.
This is because the thread component that is scrollable cannot became an activeElement.
This PR fix this by adding a tabindex="-1" on the scrollable element.

Task-3468978

closes odoo/odoo#134657

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-09-07 14:45:28 +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
Alexandre Kühn c5ece6ccc1 [FIX] mail: discuss sidebar quick search case-insensitive
Before this commit, quick search in discuss sidebar (shown when
more than 20 conversations) was case-sensitive. For example,
when a channel was named "R&D" and user types "r", the channel
was not found.

This commit fixes the issue by making search case-insensitive.

Task-3485254
opw-3445747

closes odoo/odoo#134603

X-original-commit: 02e5af467b6058ea0933255c8f0c4e8dab17f31d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-07 11:46:12 +00:00
Renaud Thiry b71e5eea64 [FIX] mail: voice do not trigger change on unmount
'unmounting' key was not passed in when cleaning up the voice recorder
for an unmount.

In whatsapp this made the composer difficult to use as the voice
recoder is unmounted each time a message is sent.
The missing key made it impossible to send multiple messages as the
composer would be in the 'recording message' state, disabling the send
button.

Task-2377154

Part-of: odoo/odoo#134377
2023-09-07 11:46:11 +00:00
+4 628f3a54e4 [IMP] mail: prepare inclusion of whatsapp channels
Prepare 'discuss.channel' model as well as discuss code to include 'whatsapp'
channels and WhatsApp flow inclusion. Those channels are specifically used
in whatsapp-based flows and have some specific behavior, hence using a
specific channel_type for them.

Also add a setting in 'mail' to install 'whatsapp' module.

Task-2377154 (Add WhatsApp Support)

Part-of: odoo/odoo#134377
Co-authored-by: Akshat Trivedi <aktr@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: Gitashri Mantha <gman@odoo.com>
Co-authored-by: Jigar Vaghela <jva@odoo.com>
Co-authored-by: Kashyap Patel <kasp@odoo.com>
Co-authored-by: Khushi Vakil <khva@odoo.com>
Co-authored-by: Nishant Jain <niai@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
Co-authored-by: Priyanshi patel <prpa@odoo.com>
Co-authored-by: Rahul Prajapati <rapr@odoo.com>
Co-authored-by: Renaud Thiry <reth@odoo.com>
Co-authored-by: Shreya Patel <shpa@odoo.com>
Co-authored-by: Stéphane Debauche <std@odoo.com>
Co-authored-by: Zeel Patel <zepa@odoo.com>
2023-09-07 11:46:11 +00:00
Pierre Pulinckx (pipu) 038169ee9f [REF] web: simplify assets loading
In this commit, the loadXML function has been removed. We use registry with
xml_templates to load XML templates for OWL Apps.
The goal of task is to remove loadXML and getBundle from assets to simplify
the understanding of assets api.

task-3266441

closes odoo/odoo#134520

Related: odoo/enterprise#47001
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-09-07 09:00:28 +00:00
Valentin Chevalier 054ca0a19a [IMP] web, *: Add more formatters in assets_frontend
Before this commit, formatters like `formatMonetary` and `formatFloat`
weren't loaded in the assets front-end.

This commit introduces `formatAmount` ( `formatMonetary` calls
`formatAmount` but makes some prior processing to deduce the currency
from the field) and makes `formatAmount` and `formatFloat` accessible
from any front-end application.

Note: The currencies were added in the front-end session info because
they are needed in `formatAmount`.

closes odoo/odoo#133824

Related: odoo/enterprise#46658
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-09-06 19:43:39 +00:00
Alexandre Kühn 90679836ff [FIX] mail: properly show name of discuss channel
Follow-up of https://github.com/odoo/odoo/pull/130821

`name_get` has been deprecated for `display_name`. In old `name_get`,
when the record had no display_name (`convert(rec._rec_name)` returns
`False`) then the fallback was empty string `""`. This has been
changed with default `_compute_display_name`, to instead show
`<rec._name>,<rec.id>`.

Discuss channel `display_name` was relying on this "" fallback
somehow: even though `rec._rec_name == ""`, `convert("") == False`,
thus fallback "" cancels out to "". The value "" for name is
intentional and necessary in discuss channels for the good working
of some other fallbacks UI, e.g. group chat concats member names.
With the recent changes of `_compute_display_name` default fallback,
it showed `discuss.channel,10` instead of "".

Steps to reproduce:
- Log in as Mitchell Admin
- Open Discuss app
- Click "Start a meeting"
=> expected: shows group chat name "Mitchell Admin"
=> result: shows group chat name "discuss.channel,10"

This commit fixes the issue by removing reliance on `display_name`
for discuss channels: it always uses `name`, thus showing taking into
account `""` as it needs for fallbacks like in group chat when it
has no name.

Task-3493629

closes odoo/odoo#134531

X-original-commit: 5592fc107790c910910c2719ede04a86910dc79f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 14:42:21 +00:00
Didier (did) f4ee483fde [IMP] mail: allow deletion of all the link preview at once
Before this commit, when a message had many link previews,
deleting all of them required to delete one by one.

This commit improves this aspect by showing a "Delete All"
button in the dialog to delete all link previews at once.

task-3488054

closes odoo/odoo#134301

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 14:42:17 +00:00
Rahul Prajapati 2319d9d339 [FIX] mail: rendering of emails in chatter
odoo/enterprise#46143

Before this commit, messages of type email were not rendered properly in the chatter. For example, the email may display text with dark color even when in dark theme or the layout of bootstrap elements like btn might not look correct.

These style issues are caused by combining the style in content of the email (e.g. inline styles) with the style of the webclient, giving the impression that the original visual of the email is buggy.

This commit fixes the issue by showing a slightly transformed style of email messages in chatter that is readable and looks nice with the Odoo theme at hand. In particular with dark theme, the background color matches the bubble color and the text is white.

Sometimes the exact visual of the original email is desired. A button "Show Original Email" in the top-right corner of the message bubble allows seeing the visual of email in its original intention.

Task-3437069

Forward-port-of: #133545
Forward-port-of: #131202
Part-of: odoo/odoo#134234
2023-09-06 11:50:55 +00:00
Alexandre Kühn 78fcad9176 [FIX] mail: properly type static methods of discuss models
Before this commit, static methods on discuss models like `.get()`
or `.new()` where not properly documented.

The superclass `Record` documents `@returns`, but jsdoc failed to
deduce these static methods return subclass instances. We tried to
find a way to define things once in `Record` and let typedoc deduce
things automatically without overriding in each models just for the
sake of type. However typedoc still sucks in 2023 despite requests
for improvements to support this specific case since 2016, 7 years
ago.

This commit fixes the issue by overriding static method in all discuss
models so that the `@returns` is properly documented.

closes odoo/odoo#134316

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 05:53:46 +00:00
Didier (did) ae9da88c0c [IMP] mail: simplify link preview payload
Before this PR the link preview formatter was creating an unnecessary complex
object in the message key.
This PR simplify the payload by using a message_id key and remove the
unnecessary object.

closes odoo/odoo#134283

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 01:18:47 +00:00
Didier (did) a6ebc20b73 [FIX] mail: only display followers with mail.mt_comment activated
Before this commit, recipient list in chatter when using composer
in "Send message" mode where listing emails of all followers, instead
of only subscribers of "Send message" (= `mail.mt_comment`).

This commit solves this issue by loading and showing followers
that are recipients in this list. Because this feature and follower
list lazy-load some data, they need to manage they own list for
the "load-more" aspect. That's why the diff shows some duplicated
code as with `followers` field of JS thread model.

closes odoo/odoo#134225

X-original-commit: ba43502b22f8f00e7a2318b341302b809e7129dc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-05 21:18:14 +00:00
Didier (did) 6aa3a1e243 [IMP] mail: message action registry + reorder actions in inbox
Before this commit, message actions were all defined in template
of `Message` component. It's good when there are few actions and
the ordering of actions is always the same, but there are now
many actions and we want to order these actions depending on context.

This commit fixes the issue by introducing a special registry to add
message actions. This registry is quite similar to thread actions:
each item define conditions to be shown, behaviour on click, and
their sequence which can depend on the context where the message is
being viewed.

In addition to this message action registry, this commit also
reorder message actions in inbox as follow:

1. Quick actions:
 - Add a Reaction
 - Mark as To do
 - Mark as Read
2. More menu:
 - View reactions
 - Reply
 - Unfollow
 - Edit
 - Delete

Task-3458086

closes odoo/odoo#131426

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-05 18:44:24 +00:00
mano-odoo 0cc569004d [FIX] web: o_quick_assign same color as the clock
As the Activity button (clock icon) is the same kind of action
it make sense to apply the text-muted on the quick assign.

To make the hover clearer we apply a text-dark on hover using the
btn-link + contextual classes function. We apply the same to the
`subtask_list_button` and milestones for consistency.

task-3382159

closes odoo/odoo#134196

X-original-commit: 4b8b6e2155eca66652b4a57dfff27b0e81d62573
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-09-05 07:19:47 +00:00
Sébastien Theys 53cd2bd72f [REF] mail: tests: remove nextAnimationFrame
In some tests it was no longer necessary.

Negative tests will be slightly weaker, but they are so weak already
that is does not change much, they should be done differently anyway.

closes odoo/odoo#134025

Related: odoo/enterprise#46739
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-04 21:53:38 +00:00
Sébastien Theys 4458a01606 [REF] mail: tests: remove nextTick
It was no longer used.

Part-of: odoo/odoo#134025
2023-09-04 21:53:37 +00:00
Sébastien Theys 7a9581e1f3 [REF] web, mail, im_livechat: tests: remove afterNextRender
Part-of: odoo/odoo#134025
2023-09-04 21:53:37 +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
Sébastien Theys 3ea78a8354 [REF] mail, website_livechat: tests: remove waitFormViewLoaded
This is no longer used since tests properly await what they require.

Part-of: odoo/odoo#134025
2023-09-04 21:53:37 +00:00
Sébastien Theys 315263f1b3 [REF] mail: tests: remove waitUntilMessagesLoaded of openDiscuss
This is no longer used since tests properly await what they require.

Part-of: odoo/odoo#134025
2023-09-04 21:53:37 +00:00
Sébastien Theys e25e70b2f5 [REF] mail: tests: remove unused getMouseenter
Part-of: odoo/odoo#134025
2023-09-04 21:53:37 +00:00
Rahul Prajapati 4250ae62b6 [FIX] mail: chatwindow header threadactions display
Before this commit:

When ThreadActions has a length of 1 it will display the threadAction
multiple times.

ex. In Mobile View When starting a new conversation with a partner from the
`New Message` button from the systray. It will have only 1 ThreadAction
which is `close`. So, it will be displayed multiple times.

After this commit:

If there is only 1 threadAction then it should not be displayed multiple times

closes odoo/odoo#134228

X-original-commit: 6a229db2db60e4b0bfdfe585f5ca05e2e373905f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-04 20:55:14 +00:00
Didier (did) 145ed67b92 [FIX] mail: avoid crash with link preview from bus notification
Before this PR, a crash occured when a link preview was recieved from the bus.
This is because the link preview was pushed twice on the `message.linkPreviews`
array.

task-3491629

closes odoo/odoo#134135

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-04 17:10:10 +00:00
Sébastien Theys cda6621fb8 [FIX] mail: set automatic email signature from correct company
When sending an email from a multi-company environment, the automatic
email signature is not corresponding to the company from which the email
is sent.

This is because the user context is not properly forwarded, in
particular the `allowed_company_ids` key.

The issue comes from the new rpc service not autmatically adding the
user context to the request, whereas the legacy rpc service did.

opw-3394780

closes odoo/odoo#133596

X-original-commit: 5d6a0257ccd7f0b0f9a05050151ba66f35aeea37
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-04 17:10:06 +00:00
Gaetan Vanden Bergh (gavb) bca14070a6 [FIX] mail: No author reply trigger error due to parent message
Steps:
No precise steps:
Send/Receive a email in discuss
Reply to it via email

Actual result: crash due to parentMessage
Expected result: no crash

opw-3480185

closes odoo/odoo#134123

X-original-commit: 743a298089620865d95f725cae8b3e5ffc9a822e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-04 16:09:30 +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
Alexandre Kühn 43882882eb [REF] mail: simplify record deletion in discuss store
Deletion of record requires removing the record entry
in `records`, and it was cumbersome to make a long expression
each time we want to remove the record from this object.
```js
// before
delete this.store.Model.records[record.localId];
// after
record.delete();
```

closes odoo/odoo#134008

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-04 10:56:08 +00:00
Alexandre Kühn d94f7e534a [REF] mail: simplify code of Record.insert() when new record
- automatically add `_store` on the record
- automatically register in `records` and return reactive when
  `records` is a obj (array => should keep doing it manually)

Part-of: odoo/odoo#134008
2023-09-04 10:56:08 +00:00
Alexandre Kühn a775b239ed [REF] mail: introduce id & get() on all discuss models
1. Introduce `static id` to all models, to uniquely identify
   a record in a model. This allows normalizing discuss store
   for all models, which helps as preparation for managing
   record deletion. Can also be combined

```js
class Message {
    static id = "id";
    id;
}
class Thread {
    static id = AND("model", "id");
}
```

2. Introduce `Model.get()` to easily get a record of model
   from data that can identify the record. This prevent leaking
   the way the record are stored in `records`, as now all records
   are indexed by localId, and localId is technical detail.

```js
Message.get(messageId);
Thread.get({ model: "discuss.channel", id: 1 });
```

Part-of: odoo/odoo#134008
2023-09-04 10:56:08 +00:00
Bruno Boi fde29ed157 [IMP] web: bump luxon lib from 3.0.1 to 3.4.2
**Changelog**

**3.4.2 (2023-08-26)**

- Fixes regression from 3.4.1 (moment/luxon#1493)

**3.4.1 (2023-08-23)**

- Fixes for regressions from 3.4.0
  (moment/luxon#1482 and moment/luxon#1488)

**3.4.0 (2023-08-08)**

- Fix type checking on input zones
- Fix Islamic months listing
- Fix normalize() for negative inputs

**3.3.0 (2023-03-03)**

- Fix off-by-one in Interval#count (moment/luxon#1308)
- Support formatting for custom zones (moment/luxon#1377)
- Fix parsing for narrow spaces (moment/luxon#1369)
- Handle leap year issue with AD 100 (moment/luxon#1390)
- Allow parsing of just an offset

**3.2.1 (2023-01-04)**

- Fix for RFC-2822 regex vulnerability
- Better handling of BCP tags with -x- extensions

**3.2.0 (2022-12-29)**

- Allow timeZone to be specified as an intl option
- Fix for diff's handling of end-of-month when crossing leap years
  (moment/luxon#1340)
- Add Interval.toLocaleString() (moment/luxon#1320)

**3.1.1 (2022-11-28)**

- Add Settings.twoDigitCutoffYear

**3.1.0 (2022-10-31)**

- Add Duration.rescale

**3.0.4 (2022-09-24)**

- Fix quarters in diffs (moment/luxon#1279)
- Export package.json in package (moment/luxon#1239)

**3.0.2 (2022-08-28)**

- Lots of doc changes
- Added DateTime.expandFormat
- Added support for custom conversion matrices in Durations

closes odoo/odoo#133599

Related: odoo/enterprise#46556
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-09-04 09:19:11 +00:00
Gaetan Vanden Bergh (gavb) b959eb5525 [FIX] mail: No author reply trigger error due to avatar
Steps:
No precise steps:
Send/Receive a email in discuss
Reply to it via email

Actual result: crash
Expected result: no crash

opw-3480185

closes odoo/odoo#133370

X-original-commit: 298be6b3762d24883f5019e094425ab8fbdd95e0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-04 09:19:09 +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
Alexandre Kühn 6bb13754ac [REF] mail: simplify discuss model register
This was bothersome to export/import the registry and manually add
the model, by providing the model name and the model class.

```js
// before
modelRegistry.add(Model.name, Model);
// after
Model.register();
```

closes odoo/odoo#133658

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-08-31 17:27:50 +00:00
Alexandre Kühn 02ca218e3c [REF] mail: remove code in model constructor
In preparation to improvements in models.
Some implementation techniques will want to `new Model()`
without any side-effects.

Part-of: odoo/odoo#133658
2023-08-31 17:27:50 +00:00
Alexandre Kühn a770d7aa33 [REF] mail: add missing 'Model.insert()' in store
That way all models are in store with a relatively similar shape.
Any improvements on models will apply to all of them.

Part-of: odoo/odoo#133658
2023-08-31 17:27:50 +00:00
tsm-odoo f9dcb907f0 [IMP] im_livechat, mail: improve onchange method
This commit improves the mail `onChange` method by adding
the support for multiple keys. This will make the code shorter
and easier to read.

closes odoo/odoo#133778

Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-08-31 16:05:49 +00:00
Aaron Bohy 2a121a32a2 [REF] *: rename unity_web_search_read into web_search_read
Part-of: odoo/odoo#133617
2023-08-31 09:04:58 +00:00
Raphael Collet 132e9f72ed [REF] *: rename onchange2 to onchange
closes odoo/odoo#133049

Related: odoo/enterprise#46240
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-08-31 05:11:44 +00:00
Alexandre Kühn 13b852d2e2 [REF] mail: move imp of service.insert() to Model.insert()
In preparation to clean code of models, e.g. by simplifying model
insertion and reducing side-effects in record insertion.

This commit moves the implementation of the `insert()` in discuss
services to the models, and drop support of the service methods
`insert()`. The only way to insert a model is through the store
entry, e.g. `store.Thread.insert()`.

closes odoo/odoo#133509

Related: odoo/enterprise#46499
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-30 23:45:41 +00:00
tsm-odoo 814b26261e [IMP] mail: add attachment panel to discuss
This PR adds a panel to consult all attachments of a discuss channel
easily.

task-3476444

closes odoo/odoo#132784

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-30 13:10:20 +00:00
zel-odoo 72da6f0ae9 [FIX] mail: chatter message overflow
1. When the width of a message is greater than the width
of the chatter, a horizontal scroll bar should be activated
on that message, and not on the whole chatter.
2. margin on the seperator to make it more consistent

task-3478057

closes odoo/odoo#133482

X-original-commit: 56a7278edfc717e9e856feccc7514d99d1bf0b2c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-29 14:09:52 +00:00