diff options
| author | Samuel Degueldre <sad@odoo.com> | 2019-09-11 08:25:14 +0000 |
|---|---|---|
| committer | Pierre Rousseau <pro@odoo.com> | 2019-09-24 07:51:38 +0000 |
| commit | c2ff5075ae46bca8e31154d0db5ecb19bc39f4d2 (patch) | |
| tree | 1116f50d2e02f0034b5d13e6935e33b9e076a361 /addons | |
| parent | 42834e4eb32df076858783ad6df14bf5cbd7c3ee (diff) | |
[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>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/snailmail/static/src/js/message.js | 4 | ||||
| -rw-r--r-- | addons/snailmail/static/src/js/thread_widget.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/snailmail/static/src/js/message.js b/addons/snailmail/static/src/js/message.js index b7b74e9242f..5549fe14261 100644 --- a/addons/snailmail/static/src/js/message.js +++ b/addons/snailmail/static/src/js/message.js @@ -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()]], }); }, /** diff --git a/addons/snailmail/static/src/js/thread_widget.js b/addons/snailmail/static/src/js/thread_widget.js index 4fd2521b4c7..84cc2a3b2dc 100644 --- a/addons/snailmail/static/src/js/thread_widget.js +++ b/addons/snailmail/static/src/js/thread_widget.js @@ -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>' |
