From eab69bcabf85c39be06b420d26bedbaa5e4e056a Mon Sep 17 00:00:00 2001 From: "Nasreddin (bon)" Date: Wed, 12 Aug 2020 13:55:31 +0000 Subject: [PATCH] [FIX] website_event: Traceback after reanaming Register button Issue - Install "Events" module - Go to website and select an event - Edit (in frontend) the event and replace the "Register" button text - Save & Close the editor - Try to register to the event Traceback raised Cause Due to this fix on 13.0 (https://github.com/odoo/odoo/commit/8579c0cae839c615415120b79d6ec22c71f7affd), the replaced arch will override the style/class if has one. In the related ticket; after renaming the "Register" button, the 'a-submit' class was removed at rendering, and so, after renaming, the class is not present in the new button while it's needed to fetch register buttons. Solution Do not remove 'a-submit' class from button since needed in js to fetch register buttons. opw-2317119 closes odoo/odoo#55884 X-original-commit: 593a471cc0a65c12416fa97ef583a9ac9392cc73 Signed-off-by: Nicolas Lempereur (nle) Signed-off-by: bon-odoo --- addons/website_event/static/src/js/website_event.js | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/website_event/static/src/js/website_event.js b/addons/website_event/static/src/js/website_event.js index 527d954c524..11990e970ce 100644 --- a/addons/website_event/static/src/js/website_event.js +++ b/addons/website_event/static/src/js/website_event.js @@ -18,7 +18,6 @@ var EventRegistrationForm = Widget.extend({ var res = this._super.apply(this.arguments).then(function () { $('#registration_form .a-submit') .off('click') - .removeClass('a-submit') .click(function (ev) { self.on_click(ev); });