diff options
| author | Denis Ledoux <dle@odoo.com> | 2017-01-27 16:56:59 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2017-02-13 15:18:23 +0100 |
| commit | 41ffb5032b490753f944be88027f1fc36ecdbd00 (patch) | |
| tree | 65ec0dcb96f08f061de7e2f750240f3c9bcc6a14 /doc/reference/javascript.rst | |
| parent | 42e6e8c3126f30d76ecb4f61897f5971eb09a259 (diff) | |
[FIX] mail, sale, account: company used in notification emails
The `user` variable in the mail templates is the `self.env.user`,
https://github.com/odoo/odoo/blob/10.0/addons/mail/models/mail_template.py#L370
which will always be the administrator in the use case
of a notification email
https://github.com/odoo/odoo/blob/10.0/addons/mail/models/res_partner.py#L151-L156
Using `user.company_id` to determine the company of the sales order
or the invoice is therefore wrong, as it will always be the administrator
company, which can be different than the order/invoice company.
opw-706267
Diffstat (limited to 'doc/reference/javascript.rst')
0 files changed, 0 insertions, 0 deletions
