[IMP] view_form: FieldStatus, calc_domain: if there is no domain defined, fetch all the records
bzr revid: chm@openerp.com-20130423140942-lu1cakf0a0rgf9pf
This commit is contained in:
parent
11ffa1be3b
commit
764b318143
|
@ -5306,7 +5306,15 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
|
|||
},
|
||||
calc_domain: function() {
|
||||
var d = instance.web.pyeval.eval('domain', this.build_domain());
|
||||
this.set("evaluated_selection_domain", ['|', ['id', '=', this.get('value')]].concat(d));
|
||||
var domain = []; //if there is no domain defined, fetch all the records
|
||||
|
||||
if (d.length) {
|
||||
domain = ['|',['id', '=', this.get('value')]].concat(d);
|
||||
}
|
||||
|
||||
if (! _.isEqual(domain, this.get("evaluated_selection_domain"))) {
|
||||
this.set("evaluated_selection_domain", domain);
|
||||
}
|
||||
},
|
||||
/** Get the selection and render it
|
||||
* selection: [[identifier, value_to_display], ...]
|
||||
|
|
Loading…
Reference in New Issue