Commit Graph
2063 Commits
Author SHA1 Message Date
Nicolas Lempereur fc70c35195 [FIX] mail: enable composer after message sent
c5dc0b2f39 disabled send button on composer sent.

But this is only needed for chatter composer, other composers directly
send the message and are not refreshed asynchronously.

So for other composer, the send button worked one time but then was
disabled and the only way to sent was ENTER (on basic composer) or
CTRL+ENTER (on extended composer).

With this fix, disabling the button is done only for chatter composer.

11.0 backport of 12.0 #28474

issue found when checking opw-1904029
closes #28506
2018-11-08 13:19:19 +00:00
Martin Geubelle 8b9cb0565e [FIX] mail: remove mail_followers widget support claim
This widget claims to support one2many fields but it doesn't work in most cases.
This was triggering warnings when this widget was set on another field or in another
view (i.e. in Studio).

opw-1905803

closes odoo/odoo#28413
2018-11-05 15:20:54 +00:00
Alexandre Kühn 91dfb15c3c [FIX] mail: mark as read only when accessing to chatter
Backport of 17bb0ca443

Before this commit, the user could not receive any notification
from the chatter of a document when having Notification Management
set to "Handle with Odoo".

This problem occurs when the user opens (or has opened) the document.
Any messages received from the document are automatically marked
as read, so it removes the notification right after receiving it.

In order to no longer have this issue, the user had to reload all
pages that have opened this document.

This commit slightly changes the behaviour of the chatter, so that
it automatically marks it as read only when accessing the document,
but not when the document is open (or has been opened). Consequently,
if the user has opened the document and then receives a notification
from this document, it won't automatically mark it as read.

Task-ID 1895359

opw-1890556

closes odoo/odoo#28113
2018-10-29 17:52:05 +00:00
Christophe Simonis ee0ff262f0 [MERGE] forward port branch saas-15 up to 953dfe92c2
closes odoo/odoo#28255
2018-10-29 14:16:45 +00:00
Christophe Simonis d692f3b781 [MERGE] forward port branch saas-14 up to 1916fdc1d0 2018-10-29 13:46:47 +01:00
Christophe Simonis 1916fdc1d0 [MERGE] forward port branch 10.0 up to ac08e2ba53 2018-10-29 12:27:14 +01:00
Olivier Colson ac08e2ba53 [FIX] mail: display both tracking values and body of the messages in mail thread
Before that, the body of the message was never displayed if the message had tracking values. This was annoying for account_asset module, were we prompt the user for some justification when she modifies the depreciation data of an asset, and then call message_post with this text as body, and tracking values reflecting the change that was made.
2018-10-26 11:37:52 +02:00
Julien (juc) Castiaux c5dc0b2f39 [FIX] mail: spam the send button create multiple messages
Spamming the "send" button on the chatter send multiple times the
same message. This PR simply disable the send button to fordib the
spam.

opw-1895511

closes #27233

closes odoo/odoo#28078
2018-10-26 09:29:57 +00:00
Lucas Perais (lpe) bb12890977 [FIX] mail: activity don't loose text of feedback popover
On an activity, click Mark as done, the popover pops over
Now write some text in it, but click somewhere else, like to copy/paste something
The popover looses focus, and your text disappears

After this commit, we store the value of the popover when hiding it,
then, when when showing back the popover, the value is reinjected

OPW 1873999
closes #26315
2018-09-10 11:24:42 +02:00
Alexandre Kühn 212ed85ac4 [FIX] mail: upload again a same file on the composer
Before this commit, it was not possible to upload again a file on the
browser from the composer, when it was added then removed from the attachments.

When a file is uploaded on the browser, it writes on a special input
some data to identify this file. In order to detect a new upload,
the code listens on the JQuery event `change` on this input. Since the
value of this input was not cleared after an attachment removal, the
user couldn't reupload the same file, because the value of the input
will be unchanged.

This commit solves this issue by clearing the special input when removing
an attachment, so that adding the same file again will trigger a `change`
on this input.
2018-07-10 15:30:30 +02:00
Nicolas Lempereurandqsm-odoo f6d36d81f7 [FIX] mail: discuss smileys on several lines
In the discuss composer on google chrome, when when the smileys have
more width than available, they stayed on one line and would increase
page size (adding an horizontal scrollbar).

This happened really easily in saas-11.3 because we have more smileys,
but still happened in 11.0 depending on the screen size.

opw-1861191
closes #25507

Co-authored-by: qsm-odoo <qsm@odoo.com>
2018-06-28 09:05:36 +02:00
Christophe Simonis b05e4d5f95 [MERGE] forward port branch saas-15 up to a53bea49fe 2018-06-14 21:28:39 +02:00
Christophe Simonis 803df909b1 [MERGE] forward port branch saas-14 up to 804d68efe5 2018-06-14 18:05:38 +02:00
Christophe Simonis 804d68efe5 [MERGE] forward port branch 10.0 up to 23a1bce2a9 2018-06-14 18:03:26 +02:00
jlzhou 68cde40515 [FIX] mail: fix translation issue in client notification
Closes #19095.
2018-06-13 11:03:46 +02:00
Lucas Perais (lpe) dded98a04c [FIX] mail: open a channel in discuss on systray click
User B mentions @UserA in a channel on discuss
User A gets two notifications: one for direct chat,the other for the channel
User A clicks on the notification for the channel

Before this commit the form view of the channel was opened

After this commit, the channel is opened in discuss

OPW 1849577
closes #25074
2018-06-08 10:06:11 +02:00
Denis Ledoux 36d45175b0 [FIX] mail: translate activity type in kanban
When opening the activity dropdown in the kanban view
of the opportunities,
the activity type names were not translated in the user language.

In addition, when marking it as done, the message
posted in the discussion thread of the opportunity
was not translated either.

opw-1847908
2018-05-18 12:31:07 +02:00
Akash Bhavsar 8b7fb9a764 [FIX] mail: Do not close chat widnow if ESCAPE key is pressed on document viewer and keep focus on chat window input when document viewer is closed (#22741)
If document viewer is opened from chat window and when document viewer is opened then focus 
remains on it's modal, pressing escape should set focus back to chat window's input element,

if file selecor dialog is opened and if user press ESCAPE on file selector dialog to cancel file selector 
dialog then it should not close chat window instead it should set focus on chat window input and on 
second ESCAPE key chat window should be closed
also increase z-index of document viewer dialog so image remain on top of cht window

OPW: 1777937
2018-05-03 15:16:56 +02:00
Christophe Simonis 320b631c81 [MERGE] forward port branch saas-15 up to 810603f4ef 2018-05-02 15:34:42 +02:00
Christophe Simonis 810603f4ef [MERGE] forward port branch saas-14 up to 55ce6aff10 2018-05-02 14:49:58 +02:00
Christophe Simonis 55ce6aff10 [MERGE] forward port branch 10.0 up to 79bbd1dcb8 2018-05-02 13:52:12 +02:00
Nicolas Martinelli 517fb99926 [FIX] mail: emoji substitution
- Create a message with 100k+ smileys
- Send it to a colleague you hate
- His (and your) web browser starts eating up all the memory
- Go cry to the technical guy because you can't use Odoo anymore.

On some browsers, like Chrome, the image rendering consumes a lot of
memory up to the point it makes it unusable.

opw-1831610
2018-04-27 08:08:36 +02:00
Martin Trigaux 82de88b066 [FIX] mail: cover more cases for URLs
Transifex URLs have an original scheme using #lang, followed by the module or
'$' (for any module) and the searched text can be quoted

Before this commit the link was cut after
https://www.transifex.com/odoo/odoo-11/translate/#fr/, making the link not
clicable

Closes #24346
2018-04-20 15:45:08 +02:00
stefanorigano 6fb59b2337 [IMP] mail: followup of 2157540768
Properly change the color of the note using variables and avoid getting
50 shades of grey in the less variables.

Increase a bit the border bottom to mark the difference.

The note vs message rendering should still probably be improved as changign the
background is a bit confusing but in the meantime, the difference is visual
enough.
2018-04-12 01:25:00 +02:00
Martin Trigaux 43e0518833 [FIX] mail: restore pre v11 note color
The gray-lighter was modified at 88881e9f to make it lighter (#F9F9 instead of
Restore the previous grey and increase contrast.

To quote "The Non-Designer's Design Book by Robin Williams":

> Contrast is created when two elements are different. If the two elements are
> sort of different, but not really, then you don't have contrast, you have
> conflict. That's the key–the principle of contrast states that if two items
> are not exactly the same, then make them different. Really different.

opw-1835722
2018-04-12 13:34:00 +02:00
Nicolas Martinelli 076cf05c2e [FIX] mail: composer expand
The expand arrow hides the last characters of the first line, which many
people (and me in particular) find annoying. We put it at the bottom
instead.

opw-1830762
2018-04-10 11:14:52 +02:00
Nicolas Martinelli 6b07bce0ec [FIX] mail: strip comments when inlining
When an unread message contains conditional html statements, clicking on
the discuss tray icon produces a JS traceback. This is due to
`node.tagName` being undefined.

When inlining, there is no need for these comments.

opw-1829641
2018-03-22 10:52:45 +01:00
Thibault Delavallée 1d25b6b84b [FIX] mail: fix chatter document link 'on <doc name>' including the 'on'
Having the 'on' using the same styling of the document name that is a link
make us think the 'on' is part of the name. Let us fix this small issue
by getting the 'on' out of the link tag.
2018-03-19 11:52:46 +01:00
Aaron Bohy c761ab2c5b [FIX] mail: redirect: prevent double-clicks
This rev. increases the wait interval of the redirect handler
called when a document is clicked in a mail thread (e.g. in the
'Inbox' in Discuss). This increases the protection against
double-clicks (preventing the document from being opened twice,
thus making twice the required RPCs, and from appearing twice in
the breadcrumbs).

A more robust solution (at the ActionManager level) will be
developed for saas-11.2 (where the ActionManager has been
refactored and is testable).
2018-03-13 12:51:44 +01:00
Aaron Bohy 3809fc891f [FIX] web,mail: always reload widget mail_activity
Before this rev., the field widget 'mail_activity' kept an internal
cache of fetched activities (like the 'mail_thread' and
'mail_followers'). However, for activities, this cache may cause
issues.

For instance, create a new lead in 'My pipeline', schedule a
'Meeting' activity on that lead (it opens the Calendar view so
that real meetings can be created), create a meeting 2 weeks from
now, go back to the lead form view: the activity still diplays that
the meeting is today (when the view is refreshed, the correct date
is displayed).

This rev. removes the internal cache for this field widget, as the
activities can easily be updated in business flows (unlike messages
or followers).

This rev. also fixes a bug in the BasicModel, where the res_ids of
a list datapoint was altered in place to return a list of x2many
commands instead of the list of ids when being stringified. This
caused a traceback when opening a lead with activities, as soon
as the internal cache had been removed.
2018-03-08 12:39:21 +01:00
tbe-odoo aded844129 [FIX] mail: Check if attachment has mimetype
- Check if the attachment has a mimetype before trying to split its value.
2018-03-02 13:16:26 +01:00
Martin Trigaux a546b34f52 [FIX] mail: use correct emoji for shortcode
:) is not the shortcode for 😊
:-) is not the shotcode for 😂
source https://emojipedia.org
2018-02-26 17:14:02 +01:00
Nicolas Martinelli e2c2a2fc69 [FIX] mail: rotate image in preview
When uploading an image as attachment, the document viewer doesn't
support the EXIF data. Therefore, a picture taken with a non-zero angle
will not appear with the right orientation (preview or full-size image).

Unfortunately, supporting EXIF data is not trivial in Python or
JavaScript without external libraries. Therefore, we add a rotate button
which allows the user to rotate the image by 90°. Moreover, we add the
`image-orientation: from-image` CSS property, which is only supported by
Firefox.

opw-1814407
2018-02-26 08:24:08 +01:00
Alexandre Kühn 58eea6b3b3 [FIX] mail: backport fixes on the composer from saas-11.2
This commit back-port some fixes from saas-11.2 on composer.
Tests are available only in saas-11.2 and up.

List of fixes:

1. Pressing TAB with @ mention propositions should cycle through them
  (see https://github.com/odoo/odoo/commit/497a44ab7f04e377decf5fde42f075616f764f26)
2. Prevent a crash when focusing out the emoji button
  (see https://github.com/odoo/odoo/commit/1753017255f3f078ede05a68842f440e02b64630)
2018-02-22 16:11:06 +01:00
Christophe Simonis dbb713c2f8 [MERGE] forward port branch saas-16 up to 49f8548557 2018-02-21 19:17:01 +01:00
Christophe Simonis 49f8548557 [MERGE] forward port branch saas-15 up to 085ff2f9c4 2018-02-21 18:36:36 +01:00
Christophe Simonis 085ff2f9c4 [MERGE] forward port branch saas-14 up to 8c692aac88 2018-02-21 18:09:17 +01:00
Christophe Simonis 68379cadbc [MERGE] forward port branch 10.0 up to 2bdc0cc7eb 2018-02-21 16:37:49 +01:00
Nicolas Lempereur e2280783a2 [FIX] mail: no view edit on forum link in notif
When sending notification from the frontend, if a template is rendered
for it and the user has the group "website.group_website_publisher" he
will get inherit_branding adding on elements things like:

  data-oe-id="42" data-oe-model="ir.ui.view" data-oe-field="arch"

but the chatter system has feature automatically redirecting an element
that have attribute "data-oe-id": this caused for example that a
link notification towards the forum would instead be redirecting to
editing the view of the notification.

This fix distinguish the inherit_branding in the chatter feature and
ignore them.

opw-813333
closes #23225
2018-02-21 13:39:25 +01:00
Nicolas Lempereur 88a4c3b5bd [FIX] mail: IP domain name when linkifying
In chatter, also linkify URL with IP address as domain name like it may
be in other part of Odoo (eg. plaintext mail received).

With this change, an URL:

http://192.168.0.1:8069/web

would be linkified.

opw-816175
closes #23153
2018-02-19 16:40:21 +01:00
Christophe Matthieu 1d49d52b3a [FIX] web: properly set parent when using mixins
The parentedMixin doesn't automatically set the parent, so when this mixin
is used, the parent must be set manually. This wasn't done at several places,
and thus those elements weren't destroyed with their actual parent.

In master, we should probably make the ParentedMixin set the parent itself.
2018-02-08 15:46:00 +01:00
Christophe Matthieu 4f5fc6ee55 [FIX] web: properly set parent when using mixins
The parentedMixin doesn't automatically set the parent, so when this mixin
is used, the parent must be set manually. This wasn't done at several places,
and thus those elements weren't destroyed with their actual parent.

In master, we should probably make the ParentedMixin set the parent itself.
2018-02-08 15:45:30 +01:00
Nicolas Lempereur c123049805 [FIX] mail: notif display form view not kanban
In mail change about activities in 07f1e902 when opening the record of a
notification, kanban view was in the action views but there doesn't seem
to be a reason and this caused an issue on enterprise mobile (since
kanban view if available has priority).

opw-804529
closes #22848
2018-02-06 15:53:25 +01:00
Nicolas Martinelli 352be6b6df [FIX] mail: date format
Use a date format in order to display the due date of an activity since
it is a date filed, not a datetime.

Closes #22614
opw-813736
2018-02-05 09:07:38 +01:00
Christophe Simonis f5e7b86686 [MERGE] forward port branch saas-16 up to 920aa6174c 2018-02-01 17:02:19 +01:00
Christophe Simonis 920aa6174c [MERGE] forward port branch saas-15 up to e0422bfd6c 2018-02-01 16:40:13 +01:00
Christophe Simonis e0422bfd6c [MERGE] forward port branch saas-14 up to 7d465aa56c 2018-02-01 15:39:39 +01:00
Christophe Simonis 7d465aa56c [MERGE] forward port branch 10.0 up to 4c9bf7faae 2018-02-01 14:16:50 +01:00
adekock11 9dce2be273 [FIX] mail: display notification when explicitly grant it
Instead of looking for the "denied" permission, rather look for the "granted"
since there are three permissions: "default", "denied", "granted" - only
"granted" counts toward permission actually being granted

Closes #22633
2018-01-31 10:44:00 +01:00
Christophe Simonis 2f95cfb8ed [MERGE] forward port branch saas-16 up to f99c4f2b48 2018-01-19 12:43:58 +01:00