[FIX] document: update environment before attachments update

Fine-tuning of commit:
b3a3ad8099
ac1e187eea

The environment should be updated before the call to _updateAttachments,
as it depends on the env active_id.

opw 1888651

closes odoo/odoo#27277
This commit is contained in:
len-odoo
2018-09-27 10:11:12 +00:00
parent 8eb8495710
commit 2a697f1c5b
@@ -50,6 +50,7 @@ Sidebar.include({
* @override
*/
updateEnv: function (env) {
this.env = env;
var _super = _.bind(this._super, this, env);
var def = this.hasAttachments ? this._updateAttachments() : $.when();
def.then(_super);