[FIX] website_slides: fix slide.channel mail completed

PURPOSE

Fix the 'multi' behavior when sending completion emails for slide.channels.

SPECS

There was a typo in the 'slide.channel#_send_completed_mail' method that
prevented it from correctly working in "multi" mode.

A new test was introduced to ensure the fix is working.

LINKS

Task 2170708

closes odoo/odoo#61004

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Aurélien Warnon
2020-10-30 10:30:18 +00:00
parent 94a6d8d7c9
commit 4ebe8ccf00
2 changed files with 37 additions and 1 deletions
@@ -105,7 +105,7 @@ class ChannelUsersRelation(models.Model):
continue
email_values.update(
author_id=self.channel_id.user_id.partner_id.id or self.env.company.partner_id.id,
author_id=record.channel_id.user_id.partner_id.id or self.env.company.partner_id.id,
auto_delete=True,
recipient_ids=[(4, pid) for pid in email_values['partner_ids']],
)