Skip to content
Permalink
Browse files

[IMP] mass_mailing: Add groups on mailing related fields

This commit adds groups on mass_mailing related fields of the utm campaign
to prevent access rights issue in case campaigns are used in other applications
(Social).

Task ID: 2045210
PR: #36416
  • Loading branch information...
qmo-odoo committed Sep 10, 2019
1 parent c1c68c8 commit f7514a614d0839b4b7b792cd8976172e1436f09a
Showing with 5 additions and 4 deletions.
  1. +5 −4 addons/mass_mailing/models/utm.py
@@ -9,11 +9,12 @@ class UtmCampaign(models.Model):

mailing_ids = fields.One2many(
'mailing.mailing', 'campaign_id',
groups="mass_mailing.group_mass_mailing_user",
string='Mass Mailings')
mailing_clicks_ratio = fields.Integer(default=0, compute="_compute_mailing_clicks_ratio", string="Number of clicks")
mailing_items = fields.Integer(compute="_compute_mailing_items", string='Number of mails')
mailing_clicked = fields.Integer(compute="_compute_mailing_items", string='Mailings Clicked')
mailings_count = fields.Integer(compute="_compute_mailings_count", string="Number of mailings")
mailing_clicks_ratio = fields.Integer(default=0, compute="_compute_mailing_clicks_ratio", groups="mass_mailing.group_mass_mailing_user", string="Number of clicks")
mailing_items = fields.Integer(compute="_compute_mailing_items", groups="mass_mailing.group_mass_mailing_user", string='Number of mails')
mailing_clicked = fields.Integer(compute="_compute_mailing_items", groups="mass_mailing.group_mass_mailing_user", string='Mailings Clicked')
mailings_count = fields.Integer(compute="_compute_mailings_count", groups="mass_mailing.group_mass_mailing_user", string="Number of mailings")
# stat fields
total = fields.Integer(compute="_compute_statistics")
scheduled = fields.Integer(compute="_compute_statistics")

0 comments on commit f7514a6

Please sign in to comment.
You can’t perform that action at this time.