diff options
| author | Christophe Matthieu <chm@openerp.com> | 2012-10-17 09:31:46 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2012-10-17 09:31:46 +0200 |
| commit | 23e20e95d41d5435cf3e5bfd136a6f52efa8a80f (patch) | |
| tree | 1969e768754adbcb6976a8b32c3eb5d35e778ac4 /addons/share/static/src/js/share.js | |
| parent | e8bd522f6be7fdeb1b7c916838193d7516833121 (diff) | |
| parent | 8a38ee944e02d6cd6cb18b87b962b67e510906a9 (diff) | |
[MERGE] from trunk
bzr revid: chm@openerp.com-20121017073146-9m5s2hffeekmj068
Diffstat (limited to 'addons/share/static/src/js/share.js')
| -rw-r--r-- | addons/share/static/src/js/share.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/share/static/src/js/share.js b/addons/share/static/src/js/share.js index bab3cac243f..e73e68144d0 100644 --- a/addons/share/static/src/js/share.js +++ b/addons/share/static/src/js/share.js @@ -15,7 +15,7 @@ openerp.share = function(session) { self.rpc('/web/session/eval_domain_and_context', { domains: [domain], contexts: [view.dataset.context] - }, function (result) { + }).then(function (result) { Share.create({ name: action.name, record_name: rec_name, @@ -24,9 +24,8 @@ openerp.share = function(session) { user_type: user_type || 'embedded', view_type: view.fields_view.type, invite: invite || false, - }, function(result) { - var share_id = result.result; - var step1 = Share.call('go_step_1', [[share_id],], function(result) { + }).then(function(share_id) { + var step1 = Share.call('go_step_1', [[share_id]]).then(function(result) { var action = result; self.do_action(action); }); |
