summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/pyeval.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-02-28 11:48:00 +0100
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commit5804ed100ec790a36c5ff30a217914950cd78098 (patch)
treea9f7ecf403cc8682c52ecce354ba082e9dee1a7c /addons/web/static/src/js/core/pyeval.js
parente5740270568404d71a3bc093074a085c9c2eded8 (diff)
[IMP] web, *: compute contexts and domains from datapoint
This commit tries to refactore the management of contexts and domains in the webclient. - Get rid of CompoundDomain: use standard array manipulation to join multiple domains or use the Domain class (to be improved) - Get rid of data.js build_domain and build_context methods - Link this.record to the data point from the basic model for all fields (not only relational fields) - Add a getContext and a getDomain function to the basic model data point (localData element) so that AbstractField implementations can use them thanks to their this.record element. - Remove the autocontext binding for field RPCs (see FieldManagerMixin)
Diffstat (limited to 'addons/web/static/src/js/core/pyeval.js')
-rw-r--r--addons/web/static/src/js/core/pyeval.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/addons/web/static/src/js/core/pyeval.js b/addons/web/static/src/js/core/pyeval.js
index 0227668e1c8..75efc9e813f 100644
--- a/addons/web/static/src/js/core/pyeval.js
+++ b/addons/web/static/src/js/core/pyeval.js
@@ -867,12 +867,6 @@ function eval_domains(domains, evaluation_context) {
evaluation_context.context = evaluation_context;
domain_array_to_combine = py.eval(domain.__debug, wrap_context(evaluation_context));
break;
- case 'compound_domain':
- var eval_context = eval_contexts([domain.__eval_context]);
- domain_array_to_combine = eval_domains(
- domain.__domains, _.extend({}, evaluation_context, eval_context)
- );
- break;
default:
domain_array_to_combine = domain;
}
@@ -983,7 +977,7 @@ function pyeval(type, object, context) {
function eval_arg(arg) {
if (typeof arg !== 'object' || !arg.__ref) { return arg; }
switch(arg.__ref) {
- case 'domain': case 'compound_domain':
+ case 'domain':
return pyeval('domains', [arg]);
case 'context': case 'compound_context':
return pyeval('contexts', [arg]);