From a87aaee0e66df0d048d48cea229f4e3524de976f Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Fri, 2 Dec 2022 10:32:53 +0000 Subject: [PATCH 1/2] [FIX] mail_show_follower: failure when partner has more than 1 user In the highly improbable but actually possible and real world case that a partner has more than one user associated, this change makes the emails able to send. @moduon MT-1634 --- mail_show_follower/models/mail_mail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mail_show_follower/models/mail_mail.py b/mail_show_follower/models/mail_mail.py index b7d49ce..7ef8a64 100644 --- a/mail_show_follower/models/mail_mail.py +++ b/mail_show_follower/models/mail_mail.py @@ -114,7 +114,10 @@ class MailMail(models.Model): if cc_internal: partners = partners_obj.filtered( lambda x: x.id not in user_partner_ids - and (not x.user_ids or x.user_ids.show_in_cc) + and ( + not x.user_ids + or any(x.mapped("user_ids.show_in_cc")) + ) ) else: partners = partners_obj.filtered( From ee0ef64318a0ad06ba59dda9deb50da7629ce419 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Fri, 2 Dec 2022 10:35:53 +0000 Subject: [PATCH 2/2] [BUILD] mail_show_follower: adopt module --- mail_show_follower/__manifest__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mail_show_follower/__manifest__.py b/mail_show_follower/__manifest__.py index 369ea11..b0ade58 100644 --- a/mail_show_follower/__manifest__.py +++ b/mail_show_follower/__manifest__.py @@ -13,6 +13,7 @@ "application": False, "installable": True, "depends": ["base", "mail"], + "maintainers": ["yajo"], "data": [ "views/res_config_settings.xml", "views/res_users.xml",