From c2ff5075ae46bca8e31154d0db5ecb19bc39f4d2 Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Wed, 11 Sep 2019 08:25:14 +0000 Subject: [PATCH] [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) --- addons/snailmail/static/src/js/message.js | 4 ++-- 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( '

The letter could not be sent due to insufficient credits on your IAP account.

' + ''