From 39fd62dfaf86d50acc2315b0c45b7b171a489fcd Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 26 Nov 2020 16:08:59 +0000 Subject: [PATCH] [FIX] website: remove old code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code is a leftover of https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8#diff-70e782021bdfee46734a7fc7dbcad3104f7f985dd37f9320f1480d424581d67fL191 - We should not get info from the `err` and `data` parameters, those are not the same as the it was before the code got migrated, `data.data` never exists. - The fact that we handle the fail on this call is also a leftover of that refactoring where the error was done through a generic template. - We should not handle an error on publish action. We never handle that kind of error if the action should not fail by default. This is typically the case when loading the menu through "Edit Menu" or the page properties. - This is especially true with later version as error raised are already handled globaly Closes #60041 closes odoo/odoo#62741 X-original-commit: 26927417e2957acba6fb79446c2520107daa7eea Signed-off-by: Jérémy Kersten (jke) Signed-off-by: Romain Derie --- .../website/static/src/js/content/website_root.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/addons/website/static/src/js/content/website_root.js b/addons/website/static/src/js/content/website_root.js index b4c65ca11b3..5d52902272c 100644 --- a/addons/website/static/src/js/content/website_root.js +++ b/addons/website/static/src/js/content/website_root.js @@ -304,20 +304,6 @@ var WebsiteRoot = publicRootData.PublicRoot.extend(KeyboardNavigationMixin, { _t("Published with success."), }); } - }) - .guardedCatch(function (err, data) { - data = data || {statusText: err.message.message}; - return new Dialog(self, { - title: data.data ? data.data.arguments[0] : "", - $content: $('
', { - html: (data.data ? data.data.arguments[1] : data.statusText) - + '
' - + _.str.sprintf( - _t('It might be possible to edit the relevant items or fix the issue in the classic Odoo interface'), - '/web#model=' + $data.data('object') + '&id=' + $data.data('id') - ), - }), - }).open(); }); }, /**