Commit Graph
7212 Commits
Author SHA1 Message Date
Julien Castiaux ceeb5b51d5 [FIX] mail: form activity widget: do not close activity popover on click
Create an activity in a chatter, mark it as done, click inside the
textarea, the popover is automatically closed.

The `click` trigger both opens and closes the popover on click.

opw-2028399

closes odoo/odoo#34982

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-07-22 15:08:15 +00:00
Julien Castiaux 7273719b88 [FIX] mail,account: use reply_to header from tmplt
Create an invoice for a customer, send him an email from the chatter, in
the mail template set a specific "Reply to" and send the email. The
"Reply-To" template mail header is ignore and the one generated by
`mail_thread._notify_get_reply_to` is used.

See also 1c57d5e and 7b0806b

opw-2041640

closes odoo/odoo#35127

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-07-24 06:25:02 +00:00
Odoo Translation Bot 72339a5301 [I18N] Update translation terms from Transifex 2019-07-21 01:18:28 +02:00
Rémi Rahir e50800deaf [IMP] mail: Add simple partner notification 2019-07-18 11:51:57 +00:00
Adrien Dieudonne 9408cab4a6 [FIX] mail: tabs should appear on mobile
Since Chrome 74 or 75, tabs in Discuss suddenly disappeared.
Normally, these buttons are displayed at the bottom of the screen
when you open the Discuss app.

So we had to review this part and it seems more logical to override
the "height: 100%" property with "min-height: 0".
By doing this, the flex box element can grow from this size.

We also set flex-shrink to 1 to reduce the content with a scroll-bar
to let enough space to the other static elements (flex 0 0 auto).

Note that these rules are only applied on mobile.

opw-2030433

closes odoo/odoo#34947

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-07-17 13:21:51 +00:00
Odoo Translation Bot 5306fbb2c5 [I18N] Update translation terms from Transifex 2019-07-14 01:19:24 +02:00
Romain Derie d82b897ea1 [FIX] mail: use base_url helper to be multi website compliant
When an email is sent and is related to a record, there is a header with a
button link to access the record.

Before this commit, that button href was always linking to the base_url URL.

That was an issue on multi-website, since we need to use the website url and
not the base_url if the record is related to a website.
That's the case for a SO eg, after checkout you receive a confirmation email.
In a multi-website environment, we need to access the record website.

To do so, a previous imp/fix was done with c1be1993f9.
But this occurence still needed to be replaced.

Fixes #34309

closes odoo/odoo#34397

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-27 08:42:16 +00:00
Odoo Translation Bot 57320593f7 [I18N] Update translation terms from Transifex 2019-07-07 01:19:07 +02:00
Jorge Pinna Puissant 7f57d3c5f2 [FIX] mail: allow more complex email layout
Add record to the email values to allow the use of more complex
email layout as : "mail.mail_notification_paynow"

opw-2025099

closes odoo/odoo#34375

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-06-27 08:15:51 +00:00
Odoo Translation Bot 2cc3ec0b8a [I18N] Update translation terms from Transifex 2019-06-30 01:17:50 +02:00
Alexandre Kühn ea1960d10a [FIX] mail: keep chat window hidden on receiving new message
Before this commit, when receiving a new message from a hidden chat
window, it was making it visible. Because of this, if we had focus
on any other window, the focus was lost. Even more annoying, if we
had focus on the left-most visible chat window, it moved to hidden
menu, so that new chat window takes its place.

This commit fixes the issue by keeping new chat windows hidden
on receiving new messages, in case there is not enough available
space.

Task-ID 2026101

closes odoo/odoo#34291

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-24 16:04:27 +00:00
Odoo Translation Bot 53b6ab9f05 [I18N] Update translation terms from Transifex 2019-06-23 01:17:13 +02:00
Martin Trigaux 51a535991f [FIX] mail: do not force changing mailing lists privacy
Changing the 'public' attribute of a mailing list to "Public" (e.g. to publish
it on /groups page), was triggering the _onchange_public which changed the
visibility of the mail.alias to public.

This was incorrect as a channel may be public but it does not means everybody
should be able to post in it. It is still possible to restrict the access to
specific members only (and it is probably a good reason to avoid spam).

The intention of 66bd7707f5 was to protect the private channels
by default but had the opposite effect if the visibility was changed.

Changed the onchange evaluation to only restrict the access when unpublishing
a channel but do not force it at public.

Context: unpublishing and republishing a mailing list had the effect to change
the alias privacy to 'everyone' and we received spam

closes odoo/odoo#34105

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-06-13 13:54:03 +00:00
Julien Castiaux 324634da3d [FIX] mail: automatically fetch new attachments
Create an invoice, validate it, print the invoice from the print menu,
as of the paperclip value in the chatter, an attachment has been added.
But if you click on the paperclip, there are no attachments. You need to
reload the page in order to access the attachments.

The problem is the internal flag indicating that all attachments are
fetched is wrong. This fix resets the flag when the paper clip value
changes.

opw-2008344

closes odoo/odoo#34171

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-06-17 11:42:55 +00:00
Odoo Translation Bot 25eac59ffa [I18N] Update translation terms from Transifex 2019-06-16 01:18:49 +02:00
Lucas Perais (lpe) 6a29dec93f [FIX] mail: message_attachment_count can be explicit in form view
Before this commit, it was not possible to have the field message_attachment_count
explicitly defined in the form view. It crashed inelegantly if it were the case

After this commit, it is possible to have that field in the form view

OPW 1998503

closes odoo/odoo#34143

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-14 13:38:09 +00:00
Christophe Simonis a526ff3f70 [FIX] mail: use correct variable
Oversight of previous forward-port.
2019-06-13 18:20:47 +02:00
Christophe Simonis a0a11fd5e2 [MERGE] forward port branch saas-11.3 up to 8a19a6a2a3 2019-06-13 18:18:17 +02:00
Christophe Simonis 8a19a6a2a3 [MERGE] forward port branch 11.0 up to ec8c66991d 2019-06-13 16:52:40 +02:00
Christophe Simonis ec8c66991d [MERGE] forward port branch saas-15 up to 641ca4f7f4 2019-06-13 16:22:23 +02:00
Christophe Simonis 641ca4f7f4 [MERGE] forward port branch saas-14 up to 6a247212f8 2019-06-13 15:32:55 +02:00
Christophe Simonis 6a247212f8 [MERGE] forward port branch 10.0 up to 818d34630d 2019-06-13 15:25:43 +02:00
Julien Castiaux 306abd0131 [FIX] mail: send same attachment multiple times
In the Discuss app, using Chrome or IE11, try to send the same
attachment to different channels. The first attachment is correctly
detected but not the next ones.

The problem is due to a browser inconsistency, on firefox selecting the
same file in an `<input type=file>` triggers the `change` event. This is
not the case on Chrome/IE, selecting the same file doesn't triggers an
`onchange`.

opw-2006647

closes odoo/odoo#34076

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-06-12 14:36:03 +00:00
Odoo Translation Bot 34ae29e68b [I18N] Update translation terms from Transifex 2019-06-09 03:07:58 +02:00
Odoo Translation Bot 72a0963d2d [I18N] Update translation terms from Transifex 2019-06-02 03:08:27 +02:00
Fanny He 3c45f08825 [FIX] mail: Remove failure_type and failure_reason when mail successfully sent
When sending a message (e.g. in a CRM lead or SO),
a failure_type and failure_reason are displayed, even when the message
is successfully sent.

This is because these fields are not updated when the email_status
is changed to "sent". We reset these fields to '' when the message is sent.

OPW-2003290

closes odoo/odoo#34082

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-06-12 15:13:36 +00:00
Nicolas Martinelliandjev-odoo 94a2c54fb5 [IMP] mail, website_mail, base: extra info on error messages
Display extra information on error messages:
- Access error based on ACLs: user, fields (if applies)
- Access error based on record rules: user, ids
- Missing error: model, operation, user, ids

closes odoo/odoo#33943

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>


Co-authored-by: jev-odoo <jev@odoo.com>
2019-06-06 11:40:28 +00:00
Odoo Translation Bot 0ebee56da5 [I18N] Update translation terms from Transifex 2019-06-09 01:17:53 +02:00
Odoo Translation Bot 28382b76d8 [I18N] Update translation terms from Transifex 2019-06-02 01:18:32 +02:00
Christophe Simonis 8a0e819d0b [MERGE] forward port branch 11.0 up to 3e12f2ff56 2019-05-29 11:10:34 +02:00
Nans Lefebvre 3e12f2ff56 [FIX] mail: fix mail template onchange
The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.

We clean up after c6d718f211 and subsequently 516f22c398 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f211.
To keep the second behaviour, we thus need to add a (5,) command.

opw 2003197

closes odoo/odoo#33706

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-28 18:44:09 +00:00
Christophe Simonis cffd147cfd [MERGE] forward port branch 11.0 up to a20a31486c 2019-05-28 15:52:00 +02:00
mreficent fa294d2059 [FIX] mail: correctly detect if model is a mail thread
closes odoo/odoo#31799

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-29 08:03:24 +00:00
Nans Lefebvre c52b9dfc37 [FIX] mail: fix mail template onchange
The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.

We clean up after c6d718f211 and subsequently 516f22c398 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f211.
To keep the second behaviour, we thus need to add a (5,) command.

opw 2003197

closes odoo/odoo#33707

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-28 18:19:26 +00:00
Odoo Translation Bot ec792da72b [I18N] Update translation terms from Transifex 2019-05-26 03:07:48 +02:00
Nans Lefebvre 95f8eb410e [FIX] mail: add all attachments at template onchange
Fine-tuning of 516f22c398.
This commit missed attachments that are linked to a mail.template,
which should be added to every mail sent using the template.

To make sure that we both fix the duplicates and the generation issue,
we add a test.

opw 2000515
opw 1998782

closes odoo/odoo#33528

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-21 12:20:07 +00:00
Odoo Translation Bot 7237b8f2a2 [I18N] Update translation terms from Transifex 2019-05-19 03:08:16 +02:00
Christophe Simonis 5f17daae40 [MERGE] forward report branch 11.0 up to daf9763e6e 2019-05-17 10:00:11 +02:00
Christophe Simonis 7b9aa21576 [MERGE] forward port branch saas-15 up to cecb1ec77d 2019-05-16 18:19:49 +02:00
Christophe Simonis cecb1ec77d [MERGE] forward port branch saas-14 up to 556b59bce1 2019-05-16 18:11:09 +02:00
Christophe Simonis 556b59bce1 [MERGE] forward port branch 10.0 up to 90d86e07dd 2019-05-16 18:10:33 +02:00
Nans Lefebvre 516f22c398 [FIX] mail: remove previous attachments when changing template
Open a mail.compose.message wizard.
Select a template that generates an attachment.
Reselect it. A second attachment has been generated.
Can be repeated ad infinitum.

At template onchange, the template is rendered to overwrite the composers values
This includes the attachments.
Let L1 be the list of attachments generated by the template.
When _convert_to_write(values) is called with {'attachment_ids': L1},
it gets self.attachments_ids = L2, and generates a [(6, 0, L1 + L2)] command.
As a result attachments are only added,
the previous ones need to be removed manually.

Since c6d718f, the semantics of _convert_to_write changed.
Before, it always returned an empty list for new records (without an id).
In other words, wa always had L2 == [].
As a result we need to adapt the wizard to keep its old behaviour.

To solve it we bypass the _convert_to_write for 'attachment_ids' and directly
generate the 6 command with the list of ids L1 generated by the template.
We only do this for templates that add attachments to keep the templates
composable (a template only overwrites the values it defines).
Unfortunately, we don't have any way to know which attachments have been added
manually, so we can't preserve these (which was the old behaviour anyway).

opw 1997430
opw 1987169
opw 1998115
opw 1998782

closes odoo/odoo#33387

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-16 13:15:03 +00:00
Denis Ledoux 272359b86c [FIX] mail: accurate message notifications marked as sent
When multiple emails (`mail.mail`) are linked
to the same message (`mail.message`),
all the message notifications were being marked as sent
as soon as one of the mail was sent, and not all of them.

This is indeed possible to have multiple emails linked to a single
message, for instance when there are employees and customers in
the followers of a thread, and some must therefore have
the buttons meant for the employees ("Assign me") and some not.

In other words, it was possible notifications were marked
as sent while their associated email was not sent yet.

This revision also comes as an addition to
5d6656d739

as it was possible to receive a bounce coming from
the previous mail sent which wrote on the same notifications `email_status`
than the current message being sent before we could acquire the lock on
them (see commit message of the above mentioned revision),
as it was writing the `email_status` on more notifications that it
should have, including notifications of the previous email.

e.g
- Mail 1
- Message 1
- Recipient A, B, C
- Mail 2
- Message 1
- Recipient D, E

Let's say recipient A bounces

If the email notifying the bounce arrives during the processing of the "Mail 1",
it will be blocked until we release the lock on the `mail.notification` `email_status`
we acquire thanks to having written `exception` on `email_status` before sending the email.
But, as soon as it is unblocked (after the `cr.commit()`),
it will immediately re-attempt the delivery of the bounce email,
therefore writting "bounced" in `email_status` of recipient A,
while the transaction of the second email already began.
When the second email sending will try to write the `email_status`
of recipient A as well
(as it used to write the `email_status` on all the message notifications,
not just the one related to the current email),
it raised a concurrent update.
Therefore:
1. Interrupting the loop, as psycopg2 exceptions are raised and not passed,
2. Replay the sending of the second email a second time.

opw-1984293

closes odoo/odoo#33431

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-05-16 12:57:57 +00:00
Christophe Simonis 624c30a3b7 [MERGE] forward port branch saas-14 up to 679a73474e 2019-05-16 11:36:32 +02:00
Christophe Simonis 679a73474e [MERGE] forward port branch 10.0 up to 0164c9dfcb 2019-05-16 11:22:53 +02:00
Olivier Dony 9fc5a4a061 [FIX] ir_mail_server, mail: catch SMTPServerDisconnected exceptions
If the smtp session was dead, it would lead the whole mail batch to fail.

opw 1949270

closes odoo/odoo#32424

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>

closes odoo/odoo#33350

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-16 07:02:06 +00:00
Nans Lefebvre 85cbb070ad [FIX] mail: remove readonly on recommended next activity
Fine-tuning of 463601a384.
It does not make sense to be able to write on mail.activity.type
using the related fields defined on mail.activity.

But this field is not a related one, and it is necessary to be writable to make
the 'recommended next activity' feature work at all.

opw 1974236

closes odoo/odoo#33325

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-13 09:10:56 +00:00
Odoo Translation Bot 5941f00143 [I18N] Update translation terms from Transifex 2019-05-12 03:10:00 +02:00
Denis Ledoux 5d6656d739 [FIX] mail: avoid concurrent update of notifications
This revision is a backport of revision
56596e5240

As the bug mentioned in the above revision
occurs as well in Odoo 10.0 and 11.0.

opw-1984293

closes odoo/odoo#33382

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-05-15 09:16:23 +00:00
Odoo Translation Bot 27aabeaad5 [I18N] Update translation terms from Transifex 2019-05-05 03:10:58 +02:00