diff options
| author | Olivier Dony <odo@odoo.com> | 2018-03-02 18:27:18 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@odoo.com> | 2018-03-02 18:27:18 +0100 |
| commit | 7836b8811b271ac834fb0a37576cd7403f5f5c3b (patch) | |
| tree | 1e92ef7ff4d9dfbfea79999fa80871f02dfdb7ba /addons | |
| parent | 71ccea35ba83f9443942c3cc642191b4e1c915ff (diff) | |
[FIX] sale*: properly mark method as @classmethod
When inheriting a @classmethod, the override needs to have the
@classmethod decorator as well, otherwise calls will fail with a
TypeError
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/controllers/mail.py | 1 | ||||
| -rw-r--r-- | addons/sale/controllers/mail.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/addons/account/controllers/mail.py b/addons/account/controllers/mail.py index f30c69e21ba..564856b909c 100644 --- a/addons/account/controllers/mail.py +++ b/addons/account/controllers/mail.py @@ -11,6 +11,7 @@ from odoo.tools.misc import consteq class MailController(MailController): + @classmethod def _redirect_to_record(cls, model, res_id, access_token=None): # If the current user doesn't have access to the invoice, but provided # a valid access token, redirect him to the front-end view. diff --git a/addons/sale/controllers/mail.py b/addons/sale/controllers/mail.py index cd0701e21db..d257bfa2736 100644 --- a/addons/sale/controllers/mail.py +++ b/addons/sale/controllers/mail.py @@ -11,6 +11,7 @@ from odoo.tools.misc import consteq class MailController(MailController): + @classmethod def _redirect_to_record(cls, model, res_id, access_token=None): # If the current user doesn't have access to the sales order, but provided # a valid access token, redirect him to the front-end view. |
