Skip to content
Snippets Groups Projects
Commit b3a3ad80 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] document: updateEnv->redraw on not form view

In ac1e187e some unecessary code and RPC were removed by ignoring
attachments in the sidebar when they would never be shown.

But there was an regression since `updateEnv` function would not
longer call redraw (which is also called in _super function).

report: https://github.com/odoo/odoo/commit/ac1e187eea3#r30569171

related to opw-1865736
closes #27146
parent a1501c3e
No related branches found
No related tags found
No related merge requests found
......@@ -50,10 +50,9 @@ Sidebar.include({
* @override
*/
updateEnv: function (env) {
if (this.hasAttachments) {
this.env = env;
this._updateAttachments().then(this._redraw.bind(this));
}
var _super = _.bind(this._super, this, env);
var def = this.hasAttachments ? this._updateAttachments() : $.when();
def.then(_super);
},
//--------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment