diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2019-02-06 10:34:57 +0000 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2019-02-06 11:07:33 +0000 |
| commit | 80460c40d9785f3e24fbc9464cc7e117f56f446f (patch) | |
| tree | 71fc517b04ffb0e00416901ecf86d92089b83c13 /addons/payment_authorize/controllers/main.py | |
| parent | a21864c36cfc9a10108fc499a6b950bcd6dc5b3a (diff) | |
[FIX] account, purchase, sale: notification with right lang
Have a partner in French while you operate in English
Click on 'send by email' on a invoice/sale order/purchase order
Before this commit:
- The body of the mail is translated in the partner's language
- but the notification header/footer surrounding the body was not
This is because:
- mail templates apply to a model
- in the case of the notification header/footer, this model is 'mail.message'
- mail.message doesn't have a lang field
- at the notification rendering time, we don't have easy (and generic) access
to the "real" model or to the lang (let alone to which lang to apply) that we need
After this commit, the notification is translated but:
the lang to get is hardcoded, and is the one on the partner of the inv/so/po
and is un-coupled from the dynamic lang on the proper inv/so/po template
This patch is hackish at several levels, I suggest that a generic solution is found in master
If no other solution is found until then, then the patch may be forward-ported
OPW 1935091
closes odoo/odoo#30873
Diffstat (limited to 'addons/payment_authorize/controllers/main.py')
0 files changed, 0 insertions, 0 deletions
