[FIX] snailmail: fix traceback on re-send or cancel failed letter, open \"Buy credits\" in new tab
PURPOSE Fixes traceback when clicking on "re-send letter" or "cancel letter" buttons (RPCs were being made with wrong number of arguments) makes the "Buy credits" link open in a new tab to not interrupt the user's workflow task-2068271 closes odoo/odoo#36667 Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
This commit is contained in:
committed by
Pierre Rousseau
parent
42834e4eb3
commit
c2ff5075ae
@@ -21,7 +21,7 @@ Message.include({
|
||||
return this._rpc({
|
||||
model: 'mail.message',
|
||||
method: 'cancel_letter',
|
||||
args: [[this.getID()], []],
|
||||
args: [[this.getID()]],
|
||||
}).then(function () {
|
||||
self.setSnailmailStatus('canceled');
|
||||
self.setSnailmailError(false);
|
||||
@@ -51,7 +51,7 @@ Message.include({
|
||||
return this._rpc({
|
||||
model: 'mail.message',
|
||||
method: 'send_letter',
|
||||
args: [[this.getID()], []],
|
||||
args: [[this.getID()]],
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -137,7 +137,7 @@ ThreadWidget.include({
|
||||
var content = _.str.sprintf(_t(
|
||||
'<p>The letter could not be sent due to insufficient credits on your IAP account.</p>' +
|
||||
'<div class= "text-right">' +
|
||||
'<a class="btn btn-link buy_credits" href=%s>' +
|
||||
'<a class="btn btn-link buy_credits" href=%s target="_blank">' +
|
||||
'<i class= "fa fa-arrow-right"/> Buy credits' +
|
||||
'</a>' +
|
||||
'</div>'
|
||||
|
||||
Reference in New Issue
Block a user