diff options
| author | Raphael Collet <rco@odoo.com> | 2019-06-17 14:29:51 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2019-07-04 11:32:22 +0000 |
| commit | 368e9530f4e6366bffa9d1289ed064bc954f8531 (patch) | |
| tree | 50162953e1adb331cb3852fd38da2631f2ece966 /addons/utm/models | |
| parent | b7fd679a6c41dbb694c6fb2ce4911798de0424b1 (diff) | |
[REF] *: `record.env.user._is_XXX()` -> `record.env.is_XXX()`
Superuser mode implies `record.env.is_XXX()`.
Diffstat (limited to 'addons/utm/models')
| -rw-r--r-- | addons/utm/models/utm_mixin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/utm/models/utm_mixin.py b/addons/utm/models/utm_mixin.py index 6d9413c51d9..e77325d32c3 100644 --- a/addons/utm/models/utm_mixin.py +++ b/addons/utm/models/utm_mixin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import api, fields, models, SUPERUSER_ID +from odoo import api, fields, models from odoo.http import request @@ -22,7 +22,7 @@ class UtmMixin(models.AbstractModel): values = super(UtmMixin, self).default_get(fields) # We ignore UTM for salemen, except some requests that could be done as superuser_id to bypass access rights. - if self.env.uid != SUPERUSER_ID and self.env.user.has_group('sales_team.group_sale_salesman'): + if not self.env.is_superuser() and self.env.user.has_group('sales_team.group_sale_salesman'): return values for url_param, field_name, cookie_name in self.env['utm.mixin'].tracking_fields(): |
