Keep a single instance of PYSON Encoder in SearchView
issue6744 review36601002
This commit is contained in:
1 parent
2c53a4ed0f
commit
2a83ece397
1 file changed
+4
-1
+4
-1
@@ -468,6 +468,9 @@
|
||||
Sao.common.MODELHISTORY = new Sao.common.ModelHistory();
|
||||
|
||||
Sao.common.ViewSearch = Sao.class_(Object, {
|
||||
init: function() {
|
||||
this.encoder = new Sao.PYSON.Encoder();
|
||||
},
|
||||
load_searches: function() {
|
||||
this.searches = {};
|
||||
return Sao.rpc({
|
||||
@@ -486,7 +489,7 @@
|
||||
'params': [[{
|
||||
'model': model,
|
||||
'name': name,
|
||||
'domain': new Sao.PYSON.Encoder().encode(domain)
|
||||
'domain': this.encoder.encode(domain)
|
||||
}], {}]
|
||||
}, Sao.Session.current_session).then(function(ids) {
|
||||
var id = ids[0];
|
||||
|
||||
Reference in new issue
Block a user