[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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user