Merge pull request #253 from hbrunn/8.0-fix166

[FIX] reset fields' domains if they contain references
pull/293/head
Pedro M. Baeza 2015-12-16 00:01:12 +01:00
commit 5fd1eadb02
1 changed files with 13 additions and 0 deletions

View File

@ -76,6 +76,19 @@ openerp.web_advanced_search_x2x = function(instance)
} }
this.searchfield = new instance.web.form.FieldMany2One( this.searchfield = new instance.web.form.FieldMany2One(
this, this.create_searchfield_node()); this, this.create_searchfield_node());
if(this.searchfield.field.domain)
{
try
{
// if this is a domain that depends on values we don't have
// remove it
jQuery.parseJSON(this.searchfield.field.domain);
}
catch(error)
{
this.searchfield.field.domain = [];
}
}
return this.searchfield; return this.searchfield;
}, },
operator_changed: function(e) operator_changed: function(e)