[FIX] website_sale_stock: fix incorrect override signature
The overridden payment_transaction() method needs to accept positional arguments as well, otherwise it will break any other override that would use positional arguments, and will fail with: payment_transaction() takes 1 positional argument but 6 were given Introduced by 4d3f2fbdcda68d4f0e0bb3bb34d51e71d963621b via #51898 closes odoo/odoo#57890 X-original-commit: a4f5f811aba02cb29e344a576fbae9305481dd73 Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
This commit is contained in:
@@ -9,7 +9,7 @@ from odoo.exceptions import ValidationError
|
||||
|
||||
class WebsiteSaleStock(WebsiteSale):
|
||||
@http.route()
|
||||
def payment_transaction(self, **kwargs):
|
||||
def payment_transaction(self, *args, **kwargs):
|
||||
""" Payment transaction override to double check cart quantities before
|
||||
placing the order
|
||||
"""
|
||||
@@ -27,4 +27,4 @@ class WebsiteSaleStock(WebsiteSale):
|
||||
))
|
||||
if values:
|
||||
raise ValidationError('. '.join(values) + '.')
|
||||
return super(WebsiteSaleStock, self).payment_transaction(**kwargs)
|
||||
return super(WebsiteSaleStock, self).payment_transaction(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user