Browse Source

[FIX] move our patched equals operator to top of list

pull/134/head
Holger Brunn 10 years ago
parent
commit
d875f7726c
  1. 21
      web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js

21
web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js

@ -27,11 +27,30 @@ openerp.web_advanced_search_x2x = function(instance)
{
template: 'web_advanced_search_x2x.extended_search.proposition.many2one',
searchfield: null,
init: function()
{
this.operators = _.sortBy(
this.operators,
function(op)
{
switch(op.value)
{
case '=':
return -2;
case '!=':
return -1;
default:
return 0;
}
});
return this._super.apply(this, arguments);
},
start: function()
{
this.getParent().$('.searchview_extended_prop_op')
.on('change', this.proxy('operator_changed'));
return this._super.apply(this, arguments);
return this._super.apply(this, arguments).then(
this.proxy(this.operator_changed));
},
get_field_desc: function()
{

Loading…
Cancel
Save