[MERGE] view_form.js: fixing the statusbar. if there is no domain defined, the statusbar mustn't try to concat with ('|',('id','=',...)) because it is creating a syntactically invalid domain
bzr revid: qdp-launchpad@openerp.com-20130314103233-icm1b664xrisy66k
This commit is contained in:
commit
d4181a6625
|
@ -5335,7 +5335,12 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
|
|||
},
|
||||
calc_domain: function() {
|
||||
var d = instance.web.pyeval.eval('domain', this.build_domain());
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue