Commit Graph
602 Commits
Author SHA1 Message Date
Lucas Perais (lpe) 8b97a39907 [FIX] mail_template: replace local links except mailto
Before this commit, all the mailto:xx@ww.com in emails were transformed into
http://web.base.url/xx@ww.com

This was due to the url parsing of werkzeug urls.py, which definitely get the scheme
(mailto), but doesn't get the netloc of the url -- because it has no //

Ater this commit, we transform links to local ones, except if the scheme is mailto,
and the issue disappears.

OPW 807795
2018-01-31 09:20:13 +01:00
Christophe Simonis 2f95cfb8ed [MERGE] forward port branch saas-16 up to f99c4f2b48 2018-01-19 12:43:58 +01:00
Christophe Simonis f99c4f2b48 [MERGE] forward port branch saas-15 up to 0c54862cbf 2018-01-19 11:30:35 +01:00
Christophe Simonis 3e197bf000 [MERGE] forward port branch saas-14 up to 4887a75e2c 2018-01-18 16:27:43 +01:00
Christophe Simonis 4887a75e2c [MERGE] forward port branch 10.0 up to ea700016dd 2018-01-18 14:30:51 +01:00
Christophe Simonis ea700016dd [FIX] mail: give access to mail.message to notified users
Before this commit, users had only access to messages if they were
recipients. However, you can still be notified for messages your are not
a recipient; leaving you with notifications (needaction) on unreachable
message.
2018-01-18 14:28:25 +01:00
Christophe Simonis e72eb4f38d [MERGE] forward port branch 9.0 up to 74b564cf8d 2018-01-17 18:00:05 +01:00
Nicolas Lempereur 80f1d9ded6 [FIX] mail: reduce no sudo effect mark_all_as_read
The "Mark all read" button either set all messages as read, or if a
domain is given, filter messages on it.

But this filtering is also dependent on not doing sudo so odd
notification to which we would somehow not have any access would never
disappear in the unread number.

Adding a sudo is risky, so this changeset just modify the test on domain
since in most instance the domain is just an empty list (so: []).

The added test before this change would fail at the last assert ("mark
all read should conclude all needactions even inacessible ones").

opw-805185
closes #22277
2018-01-17 11:49:48 +01:00
Martin Trigaux c591e4e6c1 [FIX] mail: translate model names
In the activities, the name of the models were not translated
This is only the server side of the fix.
The context needs to be added in the JS call in another commit

opw-805431
2018-01-15 16:34:39 +01:00
Christophe Simonis f1bdb459b8 [FIX] mail: use defined variable
Oversight of previous forward-port
2018-01-02 17:41:25 +01:00
Christophe Simonis f02ed9ab9a [MERGE] forward port branch saas-16 up to 0af13af5de 2018-01-02 16:54:38 +01:00
Christophe Simonis 0af13af5de [MERGE] forward port branch saas-15 up to ddd293065e 2018-01-02 15:36:25 +01:00
Christophe Simonis ddd293065e [MERGE] forward port branch saas-14 up to ba2a83ddfa 2018-01-02 15:02:26 +01:00
Christophe Simonis ba2a83ddfa [MERGE] forward port branch 10.0 up to e336dc38ca 2018-01-02 13:56:49 +01:00
Lucas Perais (lpe) cd5dcb8f98 [FIX] mail: notify 'inbox' partners
When
- a user A had set 'notifications handled by Odoo'
- a user B sent a @userA message

Before this commit, the user wasn't notified in the inbox needaction

After this commit, he is

OPW 801315
2018-01-02 09:20:50 +01:00
Adrian Torres 14f80bfae6 [FIX] mail: delete leftover followers
[FIX] mail: delete leftover followers

Previous to this commit, if during the unlink of a model which inherits
from mail.thread an exception is raised before mail.thread's unlink() is
called, followers for such model won't be properly deleted from the
database.

This commit changes this by overriding ir_model's unlink and deleting any
followers whose res_model is not installed.

Partial back-port of 3614193
Fixes #21462
OPW 786790
2017-12-26 07:27:25 +00:00
Denis Ledoux 2946d78dd7 [FIX] mail: set user_id to an inactive user partner sends a mail to the object partner_id
Before this revision,
Assigning a user for which its partner is inactive
was sending the assignation notification email to the `partner_id`
of the object.

e.g. Assigning a task to a user for which its partner is disabled
sent the assignation notification email to the customer of the task.

opw-787659
2017-12-22 16:53:33 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
Christophe Simonis ab084d580f [MERGE] forward port branch saas-15 up to 98539336a5 2017-11-30 15:27:59 +01:00
Christophe Simonis 98539336a5 [MERGE] forward port branch saas-14 up to b780e4a0e4 2017-11-30 14:44:49 +01:00
Christophe Simonis b780e4a0e4 [MERGE] forward port branch 10.0 up to ba73fd534d 2017-11-30 14:13:39 +01:00
Thibault Delavallée 7ed8829cd8 [FIX] mail: avoid access issue for portal users
As portal users do not have access to activities it makes sense to
limit access to the various activity_* fields to employees only.
2017-11-30 13:25:28 +01:00
Nicolas Martinelli 8b854ab660 [FIX] mail: auto subscription to channel
1. Install mail and hr
2. Create a new mail channel:
   name: test
   Who can follow: selected group of user
   Authorized group: Employee / Manager
   Auto subscription: Employee / Manager
3. Edit the Demo user, and add him to group Employee Managers

The Demo user is not subscribed to the channel (only Admin is)

In this case, the web client sends a `sel_groups_` key, which is not
handled by the `write` method.

Fixes #20897
opw-782301
2017-11-28 13:07:07 +01:00
Christophe Simonis 299a5e058b [MERGE] forward port branch 10.0 up to 7754538750 2017-11-28 12:25:16 +01:00
Christophe Simonis ad6f307976 [MERGE] forward port branch 9.0 up to 6d2bf44fee 2017-11-28 11:10:59 +01:00
Stefan Rijnhart 10de33a57e [FIX] mail: handle emails with a single non-text part
SAP sends out emails that only contain a PDF part, without a text or
html body, e.g.:

    X-Mailer: SAP NetWeaver 751
    Content-Type: application/pdf; name="Afleveringsbewijs.pdf"
    Content-Transfer-Encoding: base64
    Content-Description: Afleveringsbewijs

Before this patch, this single non-text part was parsed into the body of
the final message, as if it was a text part.

Making the check for the main part more restrictive solves the issue, as
there is no reason to assume that a non-multipart content is
necessarily of text/* type. This PR also includes a regression test.

Closes #21102
2017-11-27 10:58:16 +01:00
Christophe Simonis de93645fe3 [MERGE] forward port branch saas-16 up to 82add438f2 2017-11-09 19:16:05 +01:00
Christophe Simonis 82add438f2 [MERGE] forward port branch saas-15 up to 90ca872071 2017-11-09 18:05:49 +01:00
Christophe Simonis 90ca872071 [MERGE] forward port branch saas-14 up to d171f282c3 2017-11-09 16:49:41 +01:00
Christophe Simonis 9c634b5b30 [MERGE] forward port branch 10.0 up to a63ecee47a 2017-11-09 15:16:57 +01:00
Fabrice Henrion 053209fb0e [FIX] mail: add missing space
Closes #20782
2017-11-09 10:58:38 +01:00
Christophe Simonis 9342517fcf [MERGE] forward port branch 9.0 up to 35aa2a977f 2017-11-08 17:30:45 +01:00
Thibault Delavallée 20d8025036 [FIX] mail: followers alias check on models not inheriting from alias mixin
You could try to check followers on a model not inheriting from mail alias
mixin. In that case current code would check followers on a void mail
alias mixin record, meaning no followers found. Instead we now
differentiate the class method from the method checking record properties.
2017-11-08 12:51:13 +01:00
Thibault Delavallée d6a5c126e7 [FIX] mail: correctly return and log error message when checking aliases
Mesage should be message otherwise it is not displayed in the logs.
2017-11-08 12:47:12 +01:00
Thibault Delavallée 53ad585bfc [FIX] mail: ease activities management through documents
This commit improve the daily use of activities by delegating activities
management to the document. Activities are already managed on document
through the UI either in form view or in kanban view.
2017-11-08 10:42:31 +01:00
Thibault Delavallée f8c974cf6e [FIX] mail: speedup tracking values computation when reading messages 2017-11-08 10:00:47 +01:00
Martin Trigaux dc6757032f [I18N] mail: clarify the view button
View may be the action or the object
It is not translated the same way in some languages (e.g. Fi)

Fixes #20595
2017-11-06 14:39:10 +01:00
Martin Trigaux e1e3b5a56e [IMP] i18n: better terms and labels
add missing string labels
rephrase the error message
add missing _description
removed forward-ported hr_equipment.pot

was unclear, courtesy of the translators
2017-10-30 10:40:01 +01:00
Raphael Collet c7d1466996 [FIX] mail: prevent action type "add followers" on a non-mail-thread model (#20386)
OPW 777454
2017-10-23 14:51:32 +02:00
Christophe Simonis 10128fa7e8 [MERGE] forward port branch saas-16 up to dc2a6c6cd2 2017-10-20 19:27:04 +02:00
Olivier Dony dc2a6c6cd2 [FIX] mail: shorten bounce message for sender 2017-10-20 18:40:46 +02:00
Olivier Dony 68bef91d73 [FIX] P3: mail: message parsing must return native strings
There was a leftover explicit conversion to bytestrings during the
parsing of HTML email parts.

This translated into a parse result with `msg_dict['body']` as a `bytes`
instance in Python 3, instead of the expected text type.

Coercing the result of etree.tostring() with UTF-8 encoding to a
native string should preserve the semantics in both Python versions
without this side-effect.

+ simplify another instance of native string use
2017-10-20 18:40:22 +02:00
Christophe Simonis 5ea0f55d65 [MERGE] forward port branch saas-15 up to bee0c11ef7 2017-10-20 17:57:21 +02:00
Christophe Simonis bee0c11ef7 [MERGE] forward port branch saas-14 up to f3ac68ed29 2017-10-20 17:24:15 +02:00
Christophe Simonis f3ac68ed29 [MERGE] forward port branch 10.0 up to e2532f855f 2017-10-20 16:09:28 +02:00
Olivier Dony 78dcbdee6e [FIX] mail: correct typo in e5e549a4cf 2017-10-20 14:23:38 +02:00
Nicolas Martinelli e414bae770 [FIX] mail: company logo
- Activate multi-company, create companies A and B
- Set 2 companies on a user

When a message is sent (for example, thanks to the chatter), the
notification email always contains the logo of the same company,
whatever the company of the user or the company of the object.

This is a complement of commit 7a03f9ce93, applied to notifications.

Closes #20088
opw-772405
2017-10-20 10:41:24 +02:00
Christophe Simonis 945dd32eb0 [MERGE] forward port branch saas-14 up to 91e2264b28 2017-10-12 18:43:14 +02:00
Christophe Simonis 91e2264b28 [MERGE] forward port branch 10.0 up to ba519bde84 2017-10-12 17:30:01 +02:00
Christophe Simonis 5a9f1539e1 [MERGE] forward port branch 9.0 up to 99703583d4 2017-10-11 13:59:22 +02:00