[FIX] website: remove old code
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) <jke@openerp.com> Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
This commit is contained in:
@@ -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: $('<div/>', {
|
||||
html: (data.data ? data.data.arguments[1] : data.statusText)
|
||||
+ '<br/>'
|
||||
+ _.str.sprintf(
|
||||
_t('It might be possible to edit the relevant items or fix the issue in <a href="%s">the classic Odoo interface</a>'),
|
||||
'/web#model=' + $data.data('object') + '&id=' + $data.data('id')
|
||||
),
|
||||
}),
|
||||
}).open();
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user