+
| |||||||
+ Powered by Odoo + |
%s
%s
') % ( + helper_header, helper_message, + ), + 'name': _("Leads Analysis"), + 'res_model': 'crm.lead', + 'type': 'ir.actions.act_window', + 'view_mode': 'tree,pivot,graph,form', + } + + def _prepare_statistics_email_values(self): + self.ensure_one() + values = super(MassMailing, self)._prepare_statistics_email_values() + if not self.user_id: + return values + if not self.env['crm.lead'].check_access_rights('read', raise_exception=False): + return values + values['kpi_data'][1]['kpi_col1'] = { + 'value': tools.format_decimalized_number(self.crm_lead_count, decimal=0), + 'col_subtitle': _('LEADS'), + } + values['kpi_data'][1]['kpi_name'] = 'lead' + return values diff --git a/models/utm.py b/models/utm.py new file mode 100644 index 0000000..cb895aa --- /dev/null +++ b/models/utm.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class UtmCampaign(models.Model): + _inherit = 'utm.campaign' + + ab_testing_winner_selection = fields.Selection(selection_add=[('crm_lead_count', 'Leads')]) diff --git a/views/mailing_mailing_views.xml b/views/mailing_mailing_views.xml new file mode 100644 index 0000000..05ad423 --- /dev/null +++ b/views/mailing_mailing_views.xml @@ -0,0 +1,24 @@ + +