Skip to content

Commit a46b79f

Browse files
committed
[FIX] iap: fixing display in the crash manager
Before this commit, there was a default behaviour reducing the padding of the qweb render to 0 in order to display bakcground images correctly. Unfortunately, this doesn"t take in account cases where images or more generally, qweb template were not provided in the InsufficientCreditError message. This commit solves this situation.
1 parent dbdd742 commit a46b79f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

addons/iap/static/src/js/crash_manager.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@ CrashManager.include({
2626
credit: error_data.credit,
2727
}
2828
}).then(function (url) {
29+
var content = $(QWeb.render('iap.redirect_to_odoo_credit', {
30+
data: error_data,
31+
}))
32+
if (error_data.body) {
33+
content.css('padding', 0);
34+
}
2935
new Dialog(this, {
3036
size: 'large',
3137
title: error_data.title || _t("Insufficient Balance"),
32-
$content: $(QWeb.render('iap.redirect_to_odoo_credit', {
33-
data: error_data,
34-
})).css('padding', 0),
38+
$content: content,
3539
buttons: [
3640
{text: 'Buy credits at Odoo', classes : "btn-primary", click: function() {
3741
window.open(url, '_blank');

0 commit comments

Comments
 (0)