[IMP] web: propagate "on_attach_callback" to all widgets in form renderer
Co-authored-by: twa-odoo <twa@odoo.com> closes odoo/odoo#27711
This commit is contained in:
committed by
svs-odoo
co-authored by
twa-odoo
parent
de924f41ee
commit
097c8afb74
@@ -223,6 +223,15 @@ var FormRenderer = BasicRenderer.extend({
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Called each time the form view is attached into the DOM
|
||||
*/
|
||||
on_attach_callback: function () {
|
||||
_.forEach(this.allFieldWidgets, function (widgets){
|
||||
_.invoke(widgets, 'on_attach_callback');
|
||||
});
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
/**
|
||||
* @override method from AbstractRenderer
|
||||
* @param {Object} state a valid state given by the model
|
||||
|
||||
Reference in New Issue
Block a user