[FIX] web: make search by `id` possible.

+ correct tests
This commit is contained in:
Christophe Simonis 2014-08-06 17:27:27 +02:00
parent 068d4c487e
commit 135962184d
2 changed files with 3 additions and 3 deletions

View 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') {

View 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 } };