Call fields_view_get synchronously to always have the right domain parser
issue6887 review43661002
This commit is contained in:
+2
-2
@@ -24,7 +24,7 @@
|
||||
}
|
||||
return added;
|
||||
},
|
||||
execute: function(method, params, context) {
|
||||
execute: function(method, params, context, async) {
|
||||
if (context === undefined) {
|
||||
context = {};
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
'method': 'model.' + this.name + '.' + method,
|
||||
'params': params.concat(context)
|
||||
};
|
||||
return Sao.rpc(args, this.session);
|
||||
return Sao.rpc(args, this.session, async);
|
||||
},
|
||||
find: function(condition, offset, limit, order, context) {
|
||||
if (!offset) offset = 0;
|
||||
|
||||
+3
-8
@@ -1295,14 +1295,9 @@
|
||||
return this._domain_parser[view_id];
|
||||
}
|
||||
if (!(view_id in this.fields_view_tree)) {
|
||||
// Fetch default view for the next time
|
||||
this.model.execute('fields_view_get', [false, 'tree'],
|
||||
this.context).then(function(view) {
|
||||
this.fields_view_tree[view_id] = view;
|
||||
domain_parser.update_fields(view.fields);
|
||||
}.bind(this));
|
||||
view_tree = {};
|
||||
view_tree.fields = {};
|
||||
view_tree = this.model.execute('fields_view_get', [false, 'tree'],
|
||||
this.context, false);
|
||||
this.fields_view_tree[view_id] = view_tree;
|
||||
} else {
|
||||
view_tree = this.fields_view_tree[view_id];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user