diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2011-06-17 11:58:35 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2011-06-17 11:58:35 +0200 |
| commit | 858f61c6bed22a117a219b2b46f3d543fded51d3 (patch) | |
| tree | 2118bf12d11b9d278d2367f66b9ac07be63905cd /addons/base/static/src/js/data.js | |
| parent | 4205717d3a7ed34f40368cee3b6601d72c3dc903 (diff) | |
[imp] added compound domains and contexts
bzr revid: nicolas.vanhoren@openerp.com-20110617095835-oymrh9u459hhwqa1
Diffstat (limited to 'addons/base/static/src/js/data.js')
| -rw-r--r-- | addons/base/static/src/js/data.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/addons/base/static/src/js/data.js b/addons/base/static/src/js/data.js index 76a803fa0ff..2021f13f092 100644 --- a/addons/base/static/src/js/data.js +++ b/addons/base/static/src/js/data.js @@ -431,6 +431,34 @@ openerp.base.DataSetSearch = openerp.base.DataSet.extend({ } }); +openerp.base.CompoundContext = function(source_context) { + this.__ref = "compound_context"; + this.__contexts = []; + if (source_context === undefined) + return; + else if (source_context.__ref === "compound_context") + this.__contexts.concat(source_context.__contexts); + else + this.add(source_context); +}; +openerp.base.CompoundContext.prototype.add = function(context) { + this.__contexts.push(context); +}; + +openerp.base.CompoundDomain = function(source_domain) { + this.__ref = "compound_domain"; + this.__domains = []; + if (source_domain === undefined) + return; + else if (source_domain.__ref === "compound_domain") + this.__domains.concat(source_domain.__domains); + else + this.add(source_domain); +}; +openerp.base.CompoundDomain.prototype.add = function(domain) { + this.__domains.push(domain); +}; + }; // vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax: |
