[FIX] Use bin_size = true in context by default

bzr revid: fme@openerp.com-20110517174326-9oqbyhr80uad7yfy
This commit is contained in:
Fabien Meghazi 2011-05-17 19:43:26 +02:00
parent cbcefb5cbc
commit c8ab4ff8c2
1 changed files with 4 additions and 1 deletions

View File

@ -274,7 +274,7 @@ openerp.base.Session = openerp.base.BasicController.extend( /** @lends openerp.b
this.session_id = false;
this.module_list = [];
this.module_loaded = {"base": true};
this.context = { bin_size : true };
this.context = {};
},
start: function() {
this.session_restore();
@ -296,6 +296,9 @@ openerp.base.Session = openerp.base.BasicController.extend( /** @lends openerp.b
// Construct a JSON-RPC2 request, method is currently unused
params.session_id = this.session_id;
params.context = typeof(params.context) != "undefined" ? params.context : this.context;
if (!params.context.bin_size) {
params.context.bin_size = true;
}
// Use a default error handler unless defined
error_callback = typeof(error_callback) != "undefined" ? error_callback : this.on_rpc_error;