diff options
| author | Géry Debongnie <ged@odoo.com> | 2016-03-21 16:35:02 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2016-03-21 17:05:07 +0100 |
| commit | e9c34b5e61a3dc8e07d185cd513e9f8eee17c0cc (patch) | |
| tree | 4c897825cfbf3e0e3936191569c5998badd16fad /addons/web/static/src/js/views/form_relational_widgets.js | |
| parent | 95f8693a3d6feabf773e06cd812142c6749154dd (diff) | |
[FIX] web: fix issue with FieldMany2ManyTags
the widget FieldMany2ManyTags does a rpc to fetch the fields (just to
know if 'color' is in the model...). It was done in a mutex and used
later in a mutex. This commit simply use the willStart method to make
sure the data is available before rendering.
Diffstat (limited to 'addons/web/static/src/js/views/form_relational_widgets.js')
| -rw-r--r-- | addons/web/static/src/js/views/form_relational_widgets.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index 6cba3733ba1..61fd63d9e72 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -1395,13 +1395,11 @@ var FieldMany2ManyTags = AbstractManyField.extend(common.CompletionFieldMixin, c this._super(field_manager, node); common.CompletionFieldMixin.init.call(this); this.set({"value": []}); - + }, + willStart: function () { var self = this; - // We need to know if the field 'color' exists on the model - this.mutex.exec(function(){ - return self.dataset.call('fields_get', []).then(function(fields) { - self.fields = fields; - }); + return this.dataset.call('fields_get', []).then(function(fields) { + self.fields = fields; }); }, commit_value: function() { @@ -1732,4 +1730,3 @@ return { }; }); - |
