From f763accc6f81bdf111f2779845bd35250e18dfcb Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 16 Sep 2020 13:52:33 +0000 Subject: [PATCH] [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) --- addons/website_sale_stock/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_sale_stock/controllers/main.py b/addons/website_sale_stock/controllers/main.py index da26a11173c..3426cca4f44 100644 --- a/addons/website_sale_stock/controllers/main.py +++ b/addons/website_sale_stock/controllers/main.py @@ -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)