diff --git a/addons/sale/models/utm_campaign.py b/addons/sale/models/utm_campaign.py index 902856e8788..720b4024a57 100644 --- a/addons/sale/models/utm_campaign.py +++ b/addons/sale/models/utm_campaign.py @@ -7,8 +7,10 @@ class UtmCampaign(models.Model): _inherit = 'utm.campaign' _description = 'UTM Campaign' - quotation_count = fields.Integer('Quotation Count', groups='sales_team.group_sale_salesman', compute="_compute_quotation_count") - invoiced_amount = fields.Integer(default=0, compute="_compute_sale_invoiced_amount", string="Revenues generated by the campaign") + quotation_count = fields.Integer('Quotation Count', + compute="_compute_quotation_count", compute_sudo=True, groups='sales_team.group_sale_salesman') + invoiced_amount = fields.Integer(string="Revenues generated by the campaign", + compute="_compute_sale_invoiced_amount", compute_sudo=True, groups='sales_team.group_sale_salesman') company_id = fields.Many2one('res.company', string='Company', readonly=True, states={'draft': [('readonly', False)], 'refused': [('readonly', False)]}, default=lambda self: self.env.company) currency_id = fields.Many2one('res.currency', related='company_id.currency_id', string='Currency')