[imp] refactoring related to the usage of dataset.context

bzr revid: nicolas.vanhoren@openerp.com-20110701115912-40hkax6c4s28quop
This commit is contained in:
niv-openerp 2011-07-01 13:59:12 +02:00
parent 723c39a304
commit a8e6836f3c
4 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ openerp.base.FormView = openerp.base.View.extend( /** @lends openerp.base.FormV
if (this.embedded_view) {
return $.Deferred().then(this.on_loaded).resolve({fields_view: this.embedded_view});
} else {
var context = new openerp.base.CompoundContext(this.dataset.context);
var context = new openerp.base.CompoundContext(this.dataset.get_context());
if (this.view_manager.action && this.view_manager.action.context) {
context.add(this.view_manager.action.context);
}
@ -394,7 +394,7 @@ openerp.base.FormView = openerp.base.View.extend( /** @lends openerp.base.FormV
model: 'ir.attachment',
fields: ['name', 'url', 'type'],
domain: [['res_model', '=', this.dataset.model], ['res_id', '=', this.datarecord.id], ['type', 'in', ['binary', 'url']]],
context: this.dataset.context
context: this.dataset.get_context()
}, this.on_attachments_loaded);*/
}
},

View File

@ -275,7 +275,7 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi
return this.rpc('/base/listview/load', {
model: this.model,
view_id: this.view_id,
context: this.dataset.context,
context: this.dataset.get_context(),
toolbar: !!this.flags.sidebar
}, callback);
}
@ -388,7 +388,7 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi
var self = this;
_.extend(this.dataset, {
domain: dataset.domain,
context: dataset.context
context: dataset.get_context()
}).read_slice([], 0, false, function () {
self.select_record(index);
});

View File

@ -467,7 +467,7 @@ openerp.base.View = openerp.base.Controller.extend({
result : { type: 'ir.actions.act_window_close', special: action_data.special }
});
} else {
var context = new openerp.base.CompoundContext(dataset.context, action_data.context || {});
var context = new openerp.base.CompoundContext(dataset.get_context(), action_data.context || {});
switch(action_data.type) {
case 'object':
return dataset.call_button(action_data.name, [[record_id], context], handler);

View File

@ -271,7 +271,7 @@ init: function(view_manager, session, element_id, dataset, view_id) {
this.rpc(ajax, {
model: this.dataset.model,
domain: self.dataset.domain,
context :self.dataset.context
context :self.dataset.get_context()
}, function(response) {
ganttChartControl.clearAll();
jQuery("#GanttDiv").children().remove();