[FIX] correctly check default/shared filters
authorGéry Debongnie <ged@odoo.com>
Wed, 15 Oct 2014 13:01:12 +0000 (15:01 +0200)
committerGéry Debongnie <ged@odoo.com>
Tue, 21 Oct 2014 07:33:52 +0000 (09:33 +0200)
in searchview.  They were swapped in the UI, and not in the code.  It
also shows that using position as reference is fragile.

addons/web/static/src/js/search.js

index de83903..9556ba6 100644 (file)
@@ -1625,8 +1625,8 @@ instance.web.search.FavoriteMenu = instance.web.Widget.extend({
     save_favorite: function () {
         var self = this,
             filter_name = this.$inputs[0].value,
-            shared_filter = this.$inputs[1].checked,
-            default_filter = this.$inputs[2].checked;
+            default_filter = this.$inputs[1].checked,
+            shared_filter = this.$inputs[2].checked;
         if (!filter_name.length){
             this.do_warn(_t("Error"), _t("Filter name is required."));
             this.$inputs.first().focus();