[FIX] web: make search by `id` possible.
authorChristophe Simonis <chs@odoo.com>
Wed, 6 Aug 2014 15:27:27 +0000 (17:27 +0200)
committerChristophe Simonis <chs@odoo.com>
Wed, 6 Aug 2014 15:27:27 +0000 (17:27 +0200)
+ correct tests

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

index b686a48..7ed70f7 100644 (file)
@@ -1963,7 +1963,7 @@ instance.web.search.Advanced = instance.web.search.Input.extend({
                     context: this.view.dataset.context
                 }).done(function(data) {
                     self.fields = {
-                        id: { string: 'ID', type: 'id' }
+                        id: { string: 'ID', type: 'id', searchable: true }
                     };
                     _.each(data, function(field_def, field_name) {
                         if (field_def.selectable !== false && field_name != 'id') {
index d93cb13..828347b 100644 (file)
@@ -157,7 +157,7 @@ var makeSearchView = function (instance, dummy_widget_attributes, defaults) {
             return {
                 type: 'search',
                 fields: {
-                    dummy: {type: 'char', string: "Dummy"}
+                    dummy: {type: 'char', string: "Dummy", searchable: true}
                 },
                 arch: '<search><field name="dummy" widget="dummy"/></search>'
             };
@@ -168,7 +168,7 @@ var makeSearchView = function (instance, dummy_widget_attributes, defaults) {
     };
     instance.session.responses['dummy.model:fields_get'] = function () {
         return {
-            dummy: {type: 'char', string: 'Dummy'}
+            dummy: {type: 'char', string: 'Dummy', searchable: true}
         };
     };
     instance.client = { action_manager: { inner_action: undefined } };