diff options
| author | Barad Mahendra <mba@openerp.com> | 2020-01-21 12:06:53 +0000 |
|---|---|---|
| committer | Barad Mahendra <mba@openerp.com> | 2020-01-27 07:16:53 +0000 |
| commit | d7a563c1e2fc3319a373d9ed725123bc51bc1622 (patch) | |
| tree | cf6feb5139a74b82a4d9eae1660b234f521f80ac /addons/pad | |
| parent | 99f4e9a9b245ee107431da9f09e144a71064aeea (diff) | |
[FIX] pad: set collaborative pad editor name
Since commit: https://github.com/odoo/odoo/commit/c31bf95e4e5e01e9f433ac13c6be33f85a57f9b9
There is typo while getting username from session so it was default set
as 'undefined' for collaborative pad editor name.
Get the proper username from session as 'username' instead of 'userName'.
but now we want's user's whole name so instead of username(login) take
the name(name of user).
closes odoo/odoo#43805
Taskid: 2154331
Closes: #43805
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/pad')
| -rw-r--r-- | addons/pad/static/src/js/pad.js | 2 | ||||
| -rw-r--r-- | addons/pad/static/tests/pad_tests.js | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index bfab2e77a63..5fb90b50a99 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -97,7 +97,7 @@ var FieldPad = AbstractField.extend({ if (this.url) { // here, we have a valid url, so we can simply display an iframe // with the correct src attribute - var userName = encodeURIComponent(this.getSession().userName); + var userName = encodeURIComponent(this.getSession().name); var url = this.url + '?showChat=false&userName=' + userName; var content = '<iframe width="100%" height="100%" frameborder="0" src="' + url + '"></iframe>'; this.$('.oe_pad_content').html(content); diff --git a/addons/pad/static/tests/pad_tests.js b/addons/pad/static/tests/pad_tests.js index dd08dde0a1e..c11950017b6 100644 --- a/addons/pad/static/tests/pad_tests.js +++ b/addons/pad/static/tests/pad_tests.js @@ -93,7 +93,7 @@ QUnit.module('pad widget', { return this._super.apply(this, arguments); }, session: { - userName: "batman", + name: "batman", }, }); assert.isNotVisible(form.$('p.oe_unconfigured'), @@ -144,7 +144,7 @@ QUnit.module('pad widget', { return result; }, session: { - userName: "batman", + name: "batman", }, }); assert.strictEqual(form.$('.oe_pad_content').text(), "Loading", @@ -181,7 +181,7 @@ QUnit.module('pad widget', { return this._super.apply(this, arguments); }, session: { - userName: "batman", + name: "batman", }, }); var def = form.canBeDiscarded(); @@ -221,7 +221,7 @@ QUnit.module('pad widget', { return this._super.apply(this, arguments); }, session: { - userName: "batman", + name: "batman", }, }); await testUtils.form.clickEdit(form); @@ -262,7 +262,7 @@ QUnit.module('pad widget', { return this._super.apply(this, arguments); }, session: { - userName: "batman", + name: "batman", }, }); await testUtils.form.clickEdit(form); |
