From c5291f4cf459224a9ebbecb397f7efdd415b2448 Mon Sep 17 00:00:00 2001 From: Arnaud Joset Date: Fri, 2 Sep 2022 20:42:10 +0200 Subject: [PATCH] [FIX] loyalty: prevent to send mail during sale order manipulation taskid: 2920026 --- addons/loyalty/models/loyalty_card.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/loyalty/models/loyalty_card.py b/addons/loyalty/models/loyalty_card.py index 59c30e80af5..4490fd0920a 100644 --- a/addons/loyalty/models/loyalty_card.py +++ b/addons/loyalty/models/loyalty_card.py @@ -100,7 +100,7 @@ class LoyaltyCard(models.Model): """ Sends the 'At Creation' communication plan if it exist for the given coupons. """ - if self.env.context.get('loyalty_no_mail', False): + if self.env.context.get('loyalty_no_mail', False) or self.env.context.get('action_no_send_mail', False): return # Ideally one per program, but multiple is supported create_comm_per_program = dict()