mirror of https://github.com/OCA/web.git
parent
709c11c842
commit
f7132b139c
|
@ -310,10 +310,13 @@ var fieldsCache = {
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
},
|
},
|
||||||
updateCache: function (model) {
|
updateCache: function (model) {
|
||||||
this.cacheDefs[model] = new Model(model).call("fields_get", [
|
var _model = new Model(model);
|
||||||
false,
|
this.cacheDefs[model] = _model.call(
|
||||||
["store", "searchable", "type", "string", "relation", "selection", "related"],
|
"fields_get",
|
||||||
]).then((function (fields) {
|
[false, ["store", "searchable", "type", "string", "relation",
|
||||||
|
"selection", "related"]],
|
||||||
|
{context: _model.context()}
|
||||||
|
).then((function (fields) {
|
||||||
this.cache[model] = sortFields(fields);
|
this.cache[model] = sortFields(fields);
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
return this.cacheDefs[model];
|
return this.cacheDefs[model];
|
||||||
|
|
Loading…
Reference in New Issue