summaryrefslogtreecommitdiff
path: root/addons/digest/models
diff options
context:
space:
mode:
authorJulien (juc) Castiaux <juc@odoo.com>2019-02-18 12:49:22 +0000
committerJulien (juc) Castiaux <juc@odoo.com>2019-02-18 14:42:32 +0000
commit6b7f1ef0914344b68de974fe7f4488b7ecc11f06 (patch)
treeb6bd9bc00bb5ee285cf9b13b3607da90901da7e6 /addons/digest/models
parentc0847a7bd75d31671b397ad5a93fe81a510a6d48 (diff)
[FIX] digest: remove unnecessary context
The `company` context is explicitly set by `action_send` while the template previewer doesn't set it. This inconsistency leads to error when previewing the digest template. opw-1939007 closes odoo/odoo#31195
Diffstat (limited to 'addons/digest/models')
-rw-r--r--addons/digest/models/digest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/digest/models/digest.py b/addons/digest/models/digest.py
index dcbd9e6bd27..1283a5a241c 100644
--- a/addons/digest/models/digest.py
+++ b/addons/digest/models/digest.py
@@ -101,7 +101,7 @@ class Digest(models.Model):
for digest in self:
for user in digest.user_ids:
subject = '%s: %s' % (user.company_id.name, digest.name)
- digest.template_id.with_context(user=user, company=user.company_id).send_mail(digest.id, force_send=True, raise_exception=True, email_values={'email_to': user.email, 'subject': subject})
+ digest.template_id.with_context(user=user).send_mail(digest.id, force_send=True, raise_exception=True, email_values={'email_to': user.email, 'subject': subject})
digest.next_run_date = digest._get_next_run_date()
def compute_kpis(self, company, user):