Skip to content

Instantly share code, notes, and snippets.

@bouvyd
Created August 7, 2019 14:37
Show Gist options
  • Select an option

  • Save bouvyd/a11afb07395cc8da49b965df1af5b5ad to your computer and use it in GitHub Desktop.

Select an option

Save bouvyd/a11afb07395cc8da49b965df1af5b5ad to your computer and use it in GitHub Desktop.
sign bad promise
diff --git a/sign/static/src/js/sign_common.js b/sign/static/src/js/sign_common.js
index 429d547e461..9df6f508bb7 100644
--- a/sign/static/src/js/sign_common.js
+++ b/sign/static/src/js/sign_common.js
@@ -892,7 +892,7 @@ odoo.define('sign.document_signing', function (require) {
mail: mail,
}).then(function() {
self.close();
- self.sent.resolve();
+ self.sentResolve();
});
}});
options.buttons.push({text: _t("Cancel"), close: true});
@@ -902,7 +902,10 @@ odoo.define('sign.document_signing', function (require) {
this.requestID = requestID;
this.requestToken = requestToken;
- this.sent = new Promise(function() { });
+ this.sentResolve;
+ this.sent = new Promise(function(resolve) {
+ self.sentResolve = resolve;
+ });
},
open: function(name, mail) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment