summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2019-05-22 09:03:55 +0000
committerYannick Tivisse <yti@odoo.com>2019-05-29 08:09:15 +0000
commitf5dfe4727c086c7577da2aef12c2d3548ba938a3 (patch)
tree8af04c84c18ded0c1ed48c7c61640021dd9d24cb /addons/mail/models/mail_thread.py
parent11cab26fb0f2167bfccfc3f11db10ff308f067b4 (diff)
[IMP] api.py: Rename company_id/company_ids into company/companies
The goal is to be coherent with the user property. Actually, company_id and company_ids on the environment are no fields. Calling env.company_id returns a browse record, not an id.
Diffstat (limited to 'addons/mail/models/mail_thread.py')
-rw-r--r--addons/mail/models/mail_thread.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
index af5929429dc..b55f5cc0937 100644
--- a/addons/mail/models/mail_thread.py
+++ b/addons/mail/models/mail_thread.py
@@ -866,7 +866,7 @@ class MailThread(models.AbstractModel):
result_email.update(dict((rid, '%s@%s' % (catchall, alias_domain)) for rid in left_ids))
# compute name of reply-to - TDE tocheck: quotes and stuff like that
- company_name = company.name if company else self.env.company_id.name
+ company_name = company.name if company else self.env.company.name
for res_id in result_email.keys():
name = '%s%s%s' % (company_name, ' ' if doc_names.get(res_id) else '', doc_names.get(res_id, ''))
result[res_id] = formataddr((name, result_email[res_id]))
@@ -1252,7 +1252,7 @@ class MailThread(models.AbstractModel):
body = self.env.ref('mail.mail_bounce_catchall').render({
'message': message,
}, engine='ir.qweb')
- self._routing_create_bounce_email(email_from, body, message, reply_to=self.env.company_id.email)
+ self._routing_create_bounce_email(email_from, body, message, reply_to=self.env.company.email)
return []
dest_aliases = Alias.search([('alias_name', 'in', rcpt_tos_localparts)])