It might happen that a transaction produces more than one message in the
chatter. In this case, the messages are created with the exact same
date, and they might appear in the wrong order in the chatter.
We therefore sort the messages by id, and not by date. Note that the
messages are already sorted when received from the server, but the web
client has its own management of the messages' order. Relying on the
server order might imply to change other parts of the code on client
side, which is something we want to avoid on a stable version.
opw-681049
When the mail composer is opened thanks to the "Send Mail" button in
Discuss, it's possible to save a mail template, but the user can't
access it anymore later on.
This is because the field `model` is by default empty in this specific
case since this is a client action. However, when saving the template,
the default value 'mail.template' is used for the `model` field.
Therefore the domain on the `template_id` field prevents the user to
find back the model he just saved.
The fix sends the `active_model` in the context with the value
'mail.message', so that the `default_get` method of
`mail.compose.message` will set the appropriate default value.
opw-677936
Purpose:
There are too many apps when someone starts to use odoo.
The user installs an app and see at least 6 menus -> too much !
Specification:
In mail module move contacts menu into new module 'contacts' to avoid this
useless app for new users but that can be useful afterward
When tracking value is converted to be rendered as a message_post, we convert
the date/datetime with the current local from momentjs.
Related to #12327
Courtesy of @aab-odoo for help and review.
When tracking value is converted to be rendered as a message_post, we convert
the date/datetime with the current local from momentjs.
Related to #12327
Courtesy of @aab-odoo for help and review.
because of a previous refactoring, the function send_notification stopped working
at all. It was not using the instance of the bus, but the module containing the
bus instance.
A read more was added to every node having a mail-quote tag.
However all quotes and their child nodes are tagged, leading to numerous unnecessary read more / read less.
Now, all consecutive mail-quote are joined in one 'read more/read less'.
If the "NEW MESSAGE" or "Log an internal note" are clicked succeedingly
too fast, we can get into a situation where the composer is init'ed but
have not already been start'ed.
closes#11952
opw-675973
When switching between records, the displayed thread was still the one of the
previous records until the messages of the current record were loaded, which
could be confusing.
Moreover, when quickly browsing records using the pager, it could happen that
the resulting displayed thread wasn't the one of the displayed record (if
we visited a record with a long thread history, the RPC to load that history
might return after the one of the current record).
This commit aims to always synchronize the displayed thread with the current
record, by
- directly hide the previous thread when browsing records
- displaying a spinner after 1s to indicate that the thread is loading and
(possibly) not empty
- ensure to only render the thread of the last visited record
In Discuss, if a message was selected as message to reply to, it wasn't reset
when switching to another channel. So if the user sent a message in that other
channel, the message was sent as reply to the previously selected message.
This rev. ensures to always unselect messages when switching between channels.
Closes#11879