From 7836b8811b271ac834fb0a37576cd7403f5f5c3b Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 2 Mar 2018 18:27:18 +0100 Subject: [PATCH] [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 --- addons/account/controllers/mail.py | 1 + addons/sale/controllers/mail.py | 1 + 2 files changed, 2 insertions(+) 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.