[IMP] use Class for Compound* types instead of manual prototypes
bzr revid: xmo@openerp.com-20110810145840-rblh9kouk1pf63by
This commit is contained in:
parent
5492bc8cf2
commit
84dde229f0
|
@ -633,48 +633,51 @@ openerp.base.ReadOnlyDataSetSearch = openerp.base.DataSetSearch.extend({
|
||||||
on_unlink: function(ids) {}
|
on_unlink: function(ids) {}
|
||||||
});
|
});
|
||||||
|
|
||||||
openerp.base.CompoundContext = function() {
|
openerp.base.CompoundContext = openerp.base.Class.extend({
|
||||||
this.__ref = "compound_context";
|
init: function () {
|
||||||
this.__contexts = [];
|
this.__ref = "compound_context";
|
||||||
this.__eval_context = null;
|
this.__contexts = [];
|
||||||
var self = this;
|
this.__eval_context = null;
|
||||||
_.each(arguments, function(x) {
|
var self = this;
|
||||||
self.add(x);
|
_.each(arguments, function(x) {
|
||||||
});
|
self.add(x);
|
||||||
};
|
});
|
||||||
openerp.base.CompoundContext.prototype.add = function(context) {
|
},
|
||||||
this.__contexts.push(context);
|
add: function (context) {
|
||||||
return this;
|
this.__contexts.push(context);
|
||||||
};
|
return this;
|
||||||
openerp.base.CompoundContext.prototype.set_eval_context = function(eval_context) {
|
},
|
||||||
this.__eval_context = eval_context;
|
set_eval_context: function (eval_context) {
|
||||||
return this;
|
this.__eval_context = eval_context;
|
||||||
};
|
return this;
|
||||||
openerp.base.CompoundContext.prototype.get_eval_context = function() {
|
},
|
||||||
return this.__eval_context;
|
get_eval_context: function () {
|
||||||
};
|
return this.__eval_context;
|
||||||
|
}
|
||||||
openerp.base.CompoundDomain = function() {
|
});
|
||||||
this.__ref = "compound_domain";
|
|
||||||
this.__domains = [];
|
|
||||||
this.__eval_context = null;
|
|
||||||
var self = this;
|
|
||||||
_.each(arguments, function(x) {
|
|
||||||
self.add(x);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
openerp.base.CompoundDomain.prototype.add = function(domain) {
|
|
||||||
this.__domains.push(domain);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
openerp.base.CompoundDomain.prototype.set_eval_context = function(eval_context) {
|
|
||||||
this.__eval_context = eval_context;
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
openerp.base.CompoundDomain.prototype.get_eval_context = function() {
|
|
||||||
return this.__eval_context;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
openerp.base.CompoundDomain = openerp.base.Class.extend({
|
||||||
|
init: function () {
|
||||||
|
this.__ref = "compound_domain";
|
||||||
|
this.__domains = [];
|
||||||
|
this.__eval_context = null;
|
||||||
|
var self = this;
|
||||||
|
_.each(arguments, function(x) {
|
||||||
|
self.add(x);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
add: function(domain) {
|
||||||
|
this.__domains.push(domain);
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
set_eval_context: function(eval_context) {
|
||||||
|
this.__eval_context = eval_context;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
get_eval_context: function() {
|
||||||
|
return this.__eval_context;
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax:
|
// vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax:
|
||||||
|
|
Loading…
Reference in New Issue