[FIX] mass_mailing: correct 'total' value
The percentage used for A/B test was applied even when A/B testing was disabled. As that value is 10% by default the 'total' was innacurate by 90% for most mailings. task - 3008627 closes odoo/odoo#110677 X-original-commit: eb2271330e7759400dad155b72208cf7677e175e Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
@@ -261,7 +261,7 @@ class MassMailing(models.Model):
|
||||
def _compute_total(self):
|
||||
for mass_mailing in self:
|
||||
total = self.env[mass_mailing.mailing_model_real].search_count(mass_mailing._parse_mailing_domain())
|
||||
if total and mass_mailing.ab_testing_pc < 100:
|
||||
if total and mass_mailing.ab_testing_enabled and mass_mailing.ab_testing_pc < 100:
|
||||
total = max(int(total / 100.0 * mass_mailing.ab_testing_pc), 1)
|
||||
mass_mailing.total = total
|
||||
|
||||
|
||||
Reference in New Issue
Block a user