[imp] refactored search.js
bzr revid: nicolas.vanhoren@openerp.com-20120417120210-kejvstgamtpufbeq
This commit is contained in:
parent
753fac33ce
commit
827964936f
|
@ -1,7 +1,7 @@
|
||||||
openerp.web.search = function(openerp) {
|
openerp.web.search = function(instance) {
|
||||||
var QWeb = openerp.web.qweb,
|
var QWeb = instance.web.qweb,
|
||||||
_t = openerp.web._t,
|
_t = instance.web._t,
|
||||||
_lt = openerp.web._lt;
|
_lt = instance.web._lt;
|
||||||
_.mixin({
|
_.mixin({
|
||||||
sum: function (obj) { return _.reduce(obj, function (a, b) { return a + b; }, 0); }
|
sum: function (obj) { return _.reduce(obj, function (a, b) { return a + b; }, 0); }
|
||||||
});
|
});
|
||||||
|
@ -70,11 +70,11 @@ _.extend(VS.model.SearchFacet.prototype, {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.SearchView# */{
|
instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.SearchView# */{
|
||||||
template: "SearchView",
|
template: "SearchView",
|
||||||
/**
|
/**
|
||||||
* @constructs openerp.web.SearchView
|
* @constructs instance.web.SearchView
|
||||||
* @extends openerp.web.OldWidget
|
* @extends instance.web.OldWidget
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent
|
||||||
* @param element_id
|
* @param element_id
|
||||||
|
@ -178,7 +178,7 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
|
|
||||||
var running_count = 0;
|
var running_count = 0;
|
||||||
// get total filters count
|
// get total filters count
|
||||||
var is_group = function (i) { return i instanceof openerp.web.search.FilterGroup; };
|
var is_group = function (i) { return i instanceof instance.web.search.FilterGroup; };
|
||||||
var filters_count = _(this.controls).chain()
|
var filters_count = _(this.controls).chain()
|
||||||
.flatten()
|
.flatten()
|
||||||
.filter(is_group)
|
.filter(is_group)
|
||||||
|
@ -212,12 +212,12 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
name: _t("Custom Filters"),
|
name: _t("Custom Filters"),
|
||||||
filters: _.map(this.custom_filters, function (filter) {
|
filters: _.map(this.custom_filters, function (filter) {
|
||||||
// FIXME: handling of ``disabled`` being set
|
// FIXME: handling of ``disabled`` being set
|
||||||
var f = new openerp.web.search.Filter({attrs: {
|
var f = new instance.web.search.Filter({attrs: {
|
||||||
string: filter.name,
|
string: filter.name,
|
||||||
context: filter.context,
|
context: filter.context,
|
||||||
domain: filter.domain
|
domain: filter.domain
|
||||||
}}, self);
|
}}, self);
|
||||||
return new openerp.web.search.FilterGroup([f], self);
|
return new instance.web.search.FilterGroup([f], self);
|
||||||
}),
|
}),
|
||||||
length: 3
|
length: 3
|
||||||
});
|
});
|
||||||
|
@ -225,7 +225,7 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
return $.when(
|
return $.when(
|
||||||
this.render_column(col1, $('<div>').appendTo($filters)),
|
this.render_column(col1, $('<div>').appendTo($filters)),
|
||||||
this.render_column(col2, $('<div>').appendTo($filters)),
|
this.render_column(col2, $('<div>').appendTo($filters)),
|
||||||
(new openerp.web.search.Advanced(this).appendTo($drawer)));
|
(new instance.web.search.Advanced(this).appendTo($drawer)));
|
||||||
},
|
},
|
||||||
render_column: function (column, $el) {
|
render_column: function (column, $el) {
|
||||||
return $.when.apply(null, _(column).map(function (group) {
|
return $.when.apply(null, _(column).map(function (group) {
|
||||||
|
@ -314,10 +314,10 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
* @param {VS.model.SearchFacet} options.model facet object to render
|
* @param {VS.model.SearchFacet} options.model facet object to render
|
||||||
*/
|
*/
|
||||||
make_visualsearch_facet: function (options) {
|
make_visualsearch_facet: function (options) {
|
||||||
return new openerp.web.search.FilterGroupFacet(options);
|
return new instance.web.search.FilterGroupFacet(options);
|
||||||
|
|
||||||
// if (options.model.get('field') instanceof openerp.web.search.FilterGroup) {
|
// if (options.model.get('field') instanceof instance.web.search.FilterGroup) {
|
||||||
// return new openerp.web.search.FilterGroupFacet(options);
|
// return new instance.web.search.FilterGroupFacet(options);
|
||||||
// }
|
// }
|
||||||
// return new VS.ui.SearchFacet(options);
|
// return new VS.ui.SearchFacet(options);
|
||||||
},
|
},
|
||||||
|
@ -363,7 +363,7 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
var filters = [];
|
var filters = [];
|
||||||
_.each(items, function (item) {
|
_.each(items, function (item) {
|
||||||
if (filters.length && item.tag !== 'filter') {
|
if (filters.length && item.tag !== 'filter') {
|
||||||
group.push(new openerp.web.search.FilterGroup(filters, this));
|
group.push(new instance.web.search.FilterGroup(filters, this));
|
||||||
filters = [];
|
filters = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
case 'separator': case 'newline':
|
case 'separator': case 'newline':
|
||||||
break;
|
break;
|
||||||
case 'filter':
|
case 'filter':
|
||||||
filters.push(new openerp.web.search.Filter(item, this));
|
filters.push(new instance.web.search.Filter(item, this));
|
||||||
break;
|
break;
|
||||||
case 'group':
|
case 'group':
|
||||||
self.make_widgets(item.children, fields, item.attrs.string);
|
self.make_widgets(item.children, fields, item.attrs.string);
|
||||||
|
@ -385,7 +385,7 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
if (filters.length) {
|
if (filters.length) {
|
||||||
group.push(new openerp.web.search.FilterGroup(filters, this));
|
group.push(new instance.web.search.FilterGroup(filters, this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -394,10 +394,10 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
*
|
*
|
||||||
* @param {Object} item fields_view_get node for the field
|
* @param {Object} item fields_view_get node for the field
|
||||||
* @param {Object} field fields_get result for the field
|
* @param {Object} field fields_get result for the field
|
||||||
* @returns openerp.web.search.Field
|
* @returns instance.web.search.Field
|
||||||
*/
|
*/
|
||||||
make_field: function (item, field) {
|
make_field: function (item, field) {
|
||||||
var obj = openerp.web.search.fields.get_any( [item.attrs.widget, field.type]);
|
var obj = instance.web.search.fields.get_any( [item.attrs.widget, field.type]);
|
||||||
if(obj) {
|
if(obj) {
|
||||||
return new (obj) (item, field, this);
|
return new (obj) (item, field, this);
|
||||||
} else {
|
} else {
|
||||||
|
@ -460,11 +460,11 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
break;
|
break;
|
||||||
case 'save_filter':
|
case 'save_filter':
|
||||||
var data = this.build_search_data();
|
var data = this.build_search_data();
|
||||||
var context = new openerp.web.CompoundContext();
|
var context = new instance.web.CompoundContext();
|
||||||
_.each(data.contexts, function(x) {
|
_.each(data.contexts, function(x) {
|
||||||
context.add(x);
|
context.add(x);
|
||||||
});
|
});
|
||||||
var domain = new openerp.web.CompoundDomain();
|
var domain = new instance.web.CompoundDomain();
|
||||||
_.each(data.domains, function(x) {
|
_.each(data.domains, function(x) {
|
||||||
domain.add(x);
|
domain.add(x);
|
||||||
});
|
});
|
||||||
|
@ -472,7 +472,7 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
context.add({"group_by": groupbys});
|
context.add({"group_by": groupbys});
|
||||||
var dial_html = QWeb.render("SearchView.managed-filters.add");
|
var dial_html = QWeb.render("SearchView.managed-filters.add");
|
||||||
var $dial = $(dial_html);
|
var $dial = $(dial_html);
|
||||||
openerp.web.dialog($dial, {
|
instance.web.dialog($dial, {
|
||||||
modal: true,
|
modal: true,
|
||||||
title: _t("Filter Entry"),
|
title: _t("Filter Entry"),
|
||||||
buttons: [
|
buttons: [
|
||||||
|
@ -525,13 +525,13 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
on_add_to_dashboard: function() {
|
on_add_to_dashboard: function() {
|
||||||
this.$element.find(".oe_search-view-filters-management")[0].selectedIndex = 0;
|
this.$element.find(".oe_search-view-filters-management")[0].selectedIndex = 0;
|
||||||
var self = this,
|
var self = this,
|
||||||
menu = openerp.webclient.menu,
|
menu = instance.webclient.menu,
|
||||||
$dialog = $(QWeb.render("SearchView.add_to_dashboard", {
|
$dialog = $(QWeb.render("SearchView.add_to_dashboard", {
|
||||||
dashboards : menu.data.data.children,
|
dashboards : menu.data.data.children,
|
||||||
selected_menu_id : menu.$element.find('a.active').data('menu')
|
selected_menu_id : menu.$element.find('a.active').data('menu')
|
||||||
}));
|
}));
|
||||||
$dialog.find('input').val(this.fields_view.name);
|
$dialog.find('input').val(this.fields_view.name);
|
||||||
openerp.web.dialog($dialog, {
|
instance.web.dialog($dialog, {
|
||||||
modal: true,
|
modal: true,
|
||||||
title: _t("Add to Dashboard"),
|
title: _t("Add to Dashboard"),
|
||||||
buttons: [
|
buttons: [
|
||||||
|
@ -543,8 +543,8 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
var menu_id = $(this).find("select").val(),
|
var menu_id = $(this).find("select").val(),
|
||||||
title = $(this).find("input").val(),
|
title = $(this).find("input").val(),
|
||||||
data = self.build_search_data(),
|
data = self.build_search_data(),
|
||||||
context = new openerp.web.CompoundContext(),
|
context = new instance.web.CompoundContext(),
|
||||||
domain = new openerp.web.CompoundDomain();
|
domain = new instance.web.CompoundDomain();
|
||||||
_.each(data.contexts, function(x) {
|
_.each(data.contexts, function(x) {
|
||||||
context.add(x);
|
context.add(x);
|
||||||
});
|
});
|
||||||
|
@ -573,10 +573,10 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
* Performs the search view collection of widget data.
|
* Performs the search view collection of widget data.
|
||||||
*
|
*
|
||||||
* If the collection went well (all fields are valid), then triggers
|
* If the collection went well (all fields are valid), then triggers
|
||||||
* :js:func:`openerp.web.SearchView.on_search`.
|
* :js:func:`instance.web.SearchView.on_search`.
|
||||||
*
|
*
|
||||||
* If at least one field failed its validation, triggers
|
* If at least one field failed its validation, triggers
|
||||||
* :js:func:`openerp.web.SearchView.on_invalid` instead.
|
* :js:func:`instance.web.SearchView.on_invalid` instead.
|
||||||
*
|
*
|
||||||
* @param e jQuery event object coming from the "Search" button
|
* @param e jQuery event object coming from the "Search" button
|
||||||
*/
|
*/
|
||||||
|
@ -599,7 +599,7 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
groupbys.push.apply(groupbys, group_by);
|
groupbys.push.apply(groupbys, group_by);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof openerp.web.search.Invalid) {
|
if (e instanceof instance.web.search.Invalid) {
|
||||||
errors.push(e);
|
errors.push(e);
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -648,9 +648,9 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
|
||||||
});
|
});
|
||||||
|
|
||||||
/** @namespace */
|
/** @namespace */
|
||||||
openerp.web.search = {};
|
instance.web.search = {};
|
||||||
|
|
||||||
openerp.web.search.FilterGroupFacet = VS.ui.SearchFacet.extend({
|
instance.web.search.FilterGroupFacet = VS.ui.SearchFacet.extend({
|
||||||
events: _.extend({
|
events: _.extend({
|
||||||
'click': 'selectFacet'
|
'click': 'selectFacet'
|
||||||
}, VS.ui.SearchFacet.prototype.events),
|
}, VS.ui.SearchFacet.prototype.events),
|
||||||
|
@ -682,30 +682,30 @@ openerp.web.search.FilterGroupFacet = VS.ui.SearchFacet.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* Registry of search fields, called by :js:class:`openerp.web.SearchView` to
|
* Registry of search fields, called by :js:class:`instance.web.SearchView` to
|
||||||
* find and instantiate its field widgets.
|
* find and instantiate its field widgets.
|
||||||
*/
|
*/
|
||||||
openerp.web.search.fields = new openerp.web.Registry({
|
instance.web.search.fields = new instance.web.Registry({
|
||||||
'char': 'openerp.web.search.CharField',
|
'char': 'instance.web.search.CharField',
|
||||||
'text': 'openerp.web.search.CharField',
|
'text': 'instance.web.search.CharField',
|
||||||
'boolean': 'openerp.web.search.BooleanField',
|
'boolean': 'instance.web.search.BooleanField',
|
||||||
'integer': 'openerp.web.search.IntegerField',
|
'integer': 'instance.web.search.IntegerField',
|
||||||
'id': 'openerp.web.search.IntegerField',
|
'id': 'instance.web.search.IntegerField',
|
||||||
'float': 'openerp.web.search.FloatField',
|
'float': 'instance.web.search.FloatField',
|
||||||
'selection': 'openerp.web.search.SelectionField',
|
'selection': 'instance.web.search.SelectionField',
|
||||||
'datetime': 'openerp.web.search.DateTimeField',
|
'datetime': 'instance.web.search.DateTimeField',
|
||||||
'date': 'openerp.web.search.DateField',
|
'date': 'instance.web.search.DateField',
|
||||||
'many2one': 'openerp.web.search.ManyToOneField',
|
'many2one': 'instance.web.search.ManyToOneField',
|
||||||
'many2many': 'openerp.web.search.CharField',
|
'many2many': 'instance.web.search.CharField',
|
||||||
'one2many': 'openerp.web.search.CharField'
|
'one2many': 'instance.web.search.CharField'
|
||||||
});
|
});
|
||||||
openerp.web.search.Invalid = openerp.web.Class.extend( /** @lends openerp.web.search.Invalid# */{
|
instance.web.search.Invalid = instance.web.Class.extend( /** @lends instance.web.search.Invalid# */{
|
||||||
/**
|
/**
|
||||||
* Exception thrown by search widgets when they hold invalid values,
|
* Exception thrown by search widgets when they hold invalid values,
|
||||||
* which they can not return when asked.
|
* which they can not return when asked.
|
||||||
*
|
*
|
||||||
* @constructs openerp.web.search.Invalid
|
* @constructs instance.web.search.Invalid
|
||||||
* @extends openerp.web.Class
|
* @extends instance.web.Class
|
||||||
*
|
*
|
||||||
* @param field the name of the field holding an invalid value
|
* @param field the name of the field holding an invalid value
|
||||||
* @param value the invalid value
|
* @param value the invalid value
|
||||||
|
@ -723,13 +723,13 @@ openerp.web.search.Invalid = openerp.web.Class.extend( /** @lends openerp.web.se
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.Widget = openerp.web.OldWidget.extend( /** @lends openerp.web.search.Widget# */{
|
instance.web.search.Widget = instance.web.OldWidget.extend( /** @lends instance.web.search.Widget# */{
|
||||||
template: null,
|
template: null,
|
||||||
/**
|
/**
|
||||||
* Root class of all search widgets
|
* Root class of all search widgets
|
||||||
*
|
*
|
||||||
* @constructs openerp.web.search.Widget
|
* @constructs instance.web.search.Widget
|
||||||
* @extends openerp.web.OldWidget
|
* @extends instance.web.OldWidget
|
||||||
*
|
*
|
||||||
* @param view the ancestor view of this widget
|
* @param view the ancestor view of this widget
|
||||||
*/
|
*/
|
||||||
|
@ -738,14 +738,14 @@ openerp.web.search.Widget = openerp.web.OldWidget.extend( /** @lends openerp.web
|
||||||
this.view = view;
|
this.view = view;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.add_expand_listener = function($root) {
|
instance.web.search.add_expand_listener = function($root) {
|
||||||
$root.find('a.searchview_group_string').click(function (e) {
|
$root.find('a.searchview_group_string').click(function (e) {
|
||||||
$root.toggleClass('folded expanded');
|
$root.toggleClass('folded expanded');
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
openerp.web.search.Group = openerp.web.search.Widget.extend({
|
instance.web.search.Group = instance.web.search.Widget.extend({
|
||||||
template: 'SearchView.group',
|
template: 'SearchView.group',
|
||||||
init: function (view_section, view, fields) {
|
init: function (view_section, view, fields) {
|
||||||
this._super(view);
|
this._super(view);
|
||||||
|
@ -755,10 +755,10 @@ openerp.web.search.Group = openerp.web.search.Widget.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
openerp.web.search.Input = openerp.web.search.Widget.extend( /** @lends openerp.web.search.Input# */{
|
instance.web.search.Input = instance.web.search.Widget.extend( /** @lends instance.web.search.Input# */{
|
||||||
/**
|
/**
|
||||||
* @constructs openerp.web.search.Input
|
* @constructs instance.web.search.Input
|
||||||
* @extends openerp.web.search.Widget
|
* @extends instance.web.search.Widget
|
||||||
*
|
*
|
||||||
* @param view
|
* @param view
|
||||||
*/
|
*/
|
||||||
|
@ -784,7 +784,7 @@ openerp.web.search.Input = openerp.web.search.Widget.extend( /** @lends openerp.
|
||||||
* they apply to this widget, or null if they don't.
|
* they apply to this widget, or null if they don't.
|
||||||
*
|
*
|
||||||
* This default implementation will try calling
|
* This default implementation will try calling
|
||||||
* :js:func:`openerp.web.search.Input#facet_for` if the widget's name
|
* :js:func:`instance.web.search.Input#facet_for` if the widget's name
|
||||||
* matches the input key
|
* matches the input key
|
||||||
*
|
*
|
||||||
* @param {Object} defaults
|
* @param {Object} defaults
|
||||||
|
@ -820,17 +820,17 @@ openerp.web.search.Input = openerp.web.search.Widget.extend( /** @lends openerp.
|
||||||
this.attrs = attrs;
|
this.attrs = attrs;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.FilterGroup = openerp.web.search.Input.extend(/** @lends openerp.web.search.FilterGroup# */{
|
instance.web.search.FilterGroup = instance.web.search.Input.extend(/** @lends instance.web.search.FilterGroup# */{
|
||||||
template: 'SearchView.filters',
|
template: 'SearchView.filters',
|
||||||
/**
|
/**
|
||||||
* Inclusive group of filters, creates a continuous "button" with clickable
|
* Inclusive group of filters, creates a continuous "button" with clickable
|
||||||
* sections (the normal display for filters is to be a self-contained button)
|
* sections (the normal display for filters is to be a self-contained button)
|
||||||
*
|
*
|
||||||
* @constructs openerp.web.search.FilterGroup
|
* @constructs instance.web.search.FilterGroup
|
||||||
* @extends openerp.web.search.Input
|
* @extends instance.web.search.Input
|
||||||
*
|
*
|
||||||
* @param {Array<openerp.web.search.Filter>} filters elements of the group
|
* @param {Array<instance.web.search.Filter>} filters elements of the group
|
||||||
* @param {openerp.web.SearchView} view view in which the filters are contained
|
* @param {instance.web.SearchView} view view in which the filters are contained
|
||||||
*/
|
*/
|
||||||
init: function (filters, view) {
|
init: function (filters, view) {
|
||||||
this._super(view);
|
this._super(view);
|
||||||
|
@ -868,7 +868,7 @@ openerp.web.search.FilterGroup = openerp.web.search.Input.extend(/** @lends open
|
||||||
|
|
||||||
if (!contexts.length) { return; }
|
if (!contexts.length) { return; }
|
||||||
if (contexts.length === 1) { return contexts[0]; }
|
if (contexts.length === 1) { return contexts[0]; }
|
||||||
return _.extend(new openerp.web.CompoundContext, {
|
return _.extend(new instance.web.CompoundContext, {
|
||||||
__contexts: contexts
|
__contexts: contexts
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -901,7 +901,7 @@ openerp.web.search.FilterGroup = openerp.web.search.Input.extend(/** @lends open
|
||||||
for (var i=domains.length; --i;) {
|
for (var i=domains.length; --i;) {
|
||||||
domains.unshift(['|']);
|
domains.unshift(['|']);
|
||||||
}
|
}
|
||||||
return _.extend(new openerp.web.CompoundDomain(), {
|
return _.extend(new instance.web.CompoundDomain(), {
|
||||||
__domains: domains
|
__domains: domains
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -945,7 +945,7 @@ openerp.web.search.FilterGroup = openerp.web.search.Input.extend(/** @lends open
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.Filter = openerp.web.search.Input.extend(/** @lends openerp.web.search.Filter# */{
|
instance.web.search.Filter = instance.web.search.Input.extend(/** @lends instance.web.search.Filter# */{
|
||||||
template: 'SearchView.filter',
|
template: 'SearchView.filter',
|
||||||
/**
|
/**
|
||||||
* Implementation of the OpenERP filters (button with a context and/or
|
* Implementation of the OpenERP filters (button with a context and/or
|
||||||
|
@ -955,8 +955,8 @@ openerp.web.search.Filter = openerp.web.search.Input.extend(/** @lends openerp.w
|
||||||
* domains and contexts, converting between facets and filters) is
|
* domains and contexts, converting between facets and filters) is
|
||||||
* performed by the filter group.
|
* performed by the filter group.
|
||||||
*
|
*
|
||||||
* @constructs openerp.web.search.Filter
|
* @constructs instance.web.search.Filter
|
||||||
* @extends openerp.web.search.Input
|
* @extends instance.web.search.Input
|
||||||
*
|
*
|
||||||
* @param node
|
* @param node
|
||||||
* @param view
|
* @param view
|
||||||
|
@ -969,12 +969,12 @@ openerp.web.search.Filter = openerp.web.search.Input.extend(/** @lends openerp.w
|
||||||
get_context: function () { },
|
get_context: function () { },
|
||||||
get_domain: function () { },
|
get_domain: function () { },
|
||||||
});
|
});
|
||||||
openerp.web.search.Field = openerp.web.search.Input.extend( /** @lends openerp.web.search.Field# */ {
|
instance.web.search.Field = instance.web.search.Input.extend( /** @lends instance.web.search.Field# */ {
|
||||||
template: 'SearchView.field',
|
template: 'SearchView.field',
|
||||||
default_operator: '=',
|
default_operator: '=',
|
||||||
/**
|
/**
|
||||||
* @constructs openerp.web.search.Field
|
* @constructs instance.web.search.Field
|
||||||
* @extends openerp.web.search.Input
|
* @extends instance.web.search.Input
|
||||||
*
|
*
|
||||||
* @param view_section
|
* @param view_section
|
||||||
* @param field
|
* @param field
|
||||||
|
@ -1005,7 +1005,7 @@ openerp.web.search.Field = openerp.web.search.Input.extend( /** @lends openerp.w
|
||||||
if (!(has_value && context)) {
|
if (!(has_value && context)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return new openerp.web.CompoundContext(context)
|
return new instance.web.CompoundContext(context)
|
||||||
.set_eval_context({self: val});
|
.set_eval_context({self: val});
|
||||||
},
|
},
|
||||||
get_groupby: function () { },
|
get_groupby: function () { },
|
||||||
|
@ -1036,7 +1036,7 @@ openerp.web.search.Field = openerp.web.search.Input.extend( /** @lends openerp.w
|
||||||
this.attrs.operator || this.default_operator,
|
this.attrs.operator || this.default_operator,
|
||||||
facet);
|
facet);
|
||||||
}
|
}
|
||||||
return new openerp.web.CompoundDomain(domain)
|
return new instance.web.CompoundDomain(domain)
|
||||||
.set_eval_context({self: val});
|
.set_eval_context({self: val});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1048,9 +1048,9 @@ openerp.web.search.Field = openerp.web.search.Input.extend( /** @lends openerp.w
|
||||||
* * The Javascript and the HTML values are identical (strings)
|
* * The Javascript and the HTML values are identical (strings)
|
||||||
*
|
*
|
||||||
* @class
|
* @class
|
||||||
* @extends openerp.web.search.Field
|
* @extends instance.web.search.Field
|
||||||
*/
|
*/
|
||||||
openerp.web.search.CharField = openerp.web.search.Field.extend( /** @lends openerp.web.search.CharField# */ {
|
instance.web.search.CharField = instance.web.search.Field.extend( /** @lends instance.web.search.CharField# */ {
|
||||||
default_operator: 'ilike',
|
default_operator: 'ilike',
|
||||||
complete: function (value) {
|
complete: function (value) {
|
||||||
if (_.isEmpty(value)) { return $.when(null); }
|
if (_.isEmpty(value)) { return $.when(null); }
|
||||||
|
@ -1066,7 +1066,7 @@ openerp.web.search.CharField = openerp.web.search.Field.extend( /** @lends opene
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.NumberField = openerp.web.search.Field.extend(/** @lends openerp.web.search.NumberField# */{
|
instance.web.search.NumberField = instance.web.search.Field.extend(/** @lends instance.web.search.NumberField# */{
|
||||||
get_value: function () {
|
get_value: function () {
|
||||||
if (!this.$element.val()) {
|
if (!this.$element.val()) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -1075,7 +1075,7 @@ openerp.web.search.NumberField = openerp.web.search.Field.extend(/** @lends open
|
||||||
check = Number(this.$element.val());
|
check = Number(this.$element.val());
|
||||||
if (isNaN(val) || val !== check) {
|
if (isNaN(val) || val !== check) {
|
||||||
this.$element.addClass('error');
|
this.$element.addClass('error');
|
||||||
throw new openerp.web.search.Invalid(
|
throw new instance.web.search.Invalid(
|
||||||
this.attrs.name, this.$element.val(), this.error_message);
|
this.attrs.name, this.$element.val(), this.error_message);
|
||||||
}
|
}
|
||||||
this.$element.removeClass('error');
|
this.$element.removeClass('error');
|
||||||
|
@ -1084,13 +1084,13 @@ openerp.web.search.NumberField = openerp.web.search.Field.extend(/** @lends open
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* @class
|
* @class
|
||||||
* @extends openerp.web.search.NumberField
|
* @extends instance.web.search.NumberField
|
||||||
*/
|
*/
|
||||||
openerp.web.search.IntegerField = openerp.web.search.NumberField.extend(/** @lends openerp.web.search.IntegerField# */{
|
instance.web.search.IntegerField = instance.web.search.NumberField.extend(/** @lends instance.web.search.IntegerField# */{
|
||||||
error_message: _t("not a valid integer"),
|
error_message: _t("not a valid integer"),
|
||||||
parse: function (value) {
|
parse: function (value) {
|
||||||
try {
|
try {
|
||||||
return openerp.web.parse_value(value, {'widget': 'integer'});
|
return instance.web.parse_value(value, {'widget': 'integer'});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return NaN;
|
return NaN;
|
||||||
}
|
}
|
||||||
|
@ -1098,13 +1098,13 @@ openerp.web.search.IntegerField = openerp.web.search.NumberField.extend(/** @len
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* @class
|
* @class
|
||||||
* @extends openerp.web.search.NumberField
|
* @extends instance.web.search.NumberField
|
||||||
*/
|
*/
|
||||||
openerp.web.search.FloatField = openerp.web.search.NumberField.extend(/** @lends openerp.web.search.FloatField# */{
|
instance.web.search.FloatField = instance.web.search.NumberField.extend(/** @lends instance.web.search.FloatField# */{
|
||||||
error_message: _t("not a valid number"),
|
error_message: _t("not a valid number"),
|
||||||
parse: function (value) {
|
parse: function (value) {
|
||||||
try {
|
try {
|
||||||
return openerp.web.parse_value(value, {'widget': 'float'});
|
return instance.web.parse_value(value, {'widget': 'float'});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return NaN;
|
return NaN;
|
||||||
}
|
}
|
||||||
|
@ -1112,9 +1112,9 @@ openerp.web.search.FloatField = openerp.web.search.NumberField.extend(/** @lends
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* @class
|
* @class
|
||||||
* @extends openerp.web.search.Field
|
* @extends instance.web.search.Field
|
||||||
*/
|
*/
|
||||||
openerp.web.search.SelectionField = openerp.web.search.Field.extend(/** @lends openerp.web.search.SelectionField# */{
|
instance.web.search.SelectionField = instance.web.search.Field.extend(/** @lends instance.web.search.SelectionField# */{
|
||||||
// This implementation is a basic <select> field, but it may have to be
|
// This implementation is a basic <select> field, but it may have to be
|
||||||
// altered to be more in line with the GTK client, which uses a combo box
|
// altered to be more in line with the GTK client, which uses a combo box
|
||||||
// (~ jquery.autocomplete):
|
// (~ jquery.autocomplete):
|
||||||
|
@ -1171,10 +1171,10 @@ openerp.web.search.SelectionField = openerp.web.search.Field.extend(/** @lends o
|
||||||
return facet.get('json');
|
return facet.get('json');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.BooleanField = openerp.web.search.SelectionField.extend(/** @lends openerp.web.search.BooleanField# */{
|
instance.web.search.BooleanField = instance.web.search.SelectionField.extend(/** @lends instance.web.search.BooleanField# */{
|
||||||
/**
|
/**
|
||||||
* @constructs openerp.web.search.BooleanField
|
* @constructs instance.web.search.BooleanField
|
||||||
* @extends openerp.web.search.BooleanField
|
* @extends instance.web.search.BooleanField
|
||||||
*/
|
*/
|
||||||
init: function () {
|
init: function () {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
@ -1193,16 +1193,16 @@ openerp.web.search.BooleanField = openerp.web.search.SelectionField.extend(/** @
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* @class
|
* @class
|
||||||
* @extends openerp.web.search.DateField
|
* @extends instance.web.search.DateField
|
||||||
*/
|
*/
|
||||||
openerp.web.search.DateField = openerp.web.search.Field.extend(/** @lends openerp.web.search.DateField# */{
|
instance.web.search.DateField = instance.web.search.Field.extend(/** @lends instance.web.search.DateField# */{
|
||||||
get_value: function (facet) {
|
get_value: function (facet) {
|
||||||
return openerp.web.date_to_str(facet.get('json'));
|
return instance.web.date_to_str(facet.get('json'));
|
||||||
},
|
},
|
||||||
complete: function (needle) {
|
complete: function (needle) {
|
||||||
var d = Date.parse(needle);
|
var d = Date.parse(needle);
|
||||||
if (!d) { return $.when(null); }
|
if (!d) { return $.when(null); }
|
||||||
var value = openerp.web.format_value(d, this.attrs);
|
var value = instance.web.format_value(d, this.attrs);
|
||||||
var label = _.str.sprintf(_.str.escapeHTML(
|
var label = _.str.sprintf(_.str.escapeHTML(
|
||||||
_t("Search %(field)s at: %(value)s")), {
|
_t("Search %(field)s at: %(value)s")), {
|
||||||
field: '<em>' + this.attrs.string + '</em>',
|
field: '<em>' + this.attrs.string + '</em>',
|
||||||
|
@ -1225,17 +1225,17 @@ openerp.web.search.DateField = openerp.web.search.Field.extend(/** @lends opener
|
||||||
* spanning the whole day selected by the date widget
|
* spanning the whole day selected by the date widget
|
||||||
*
|
*
|
||||||
* @class
|
* @class
|
||||||
* @extends openerp.web.DateField
|
* @extends instance.web.DateField
|
||||||
*/
|
*/
|
||||||
openerp.web.search.DateTimeField = openerp.web.search.DateField.extend(/** @lends openerp.web.search.DateTimeField# */{
|
instance.web.search.DateTimeField = instance.web.search.DateField.extend(/** @lends instance.web.search.DateTimeField# */{
|
||||||
get_value: function (facet) {
|
get_value: function (facet) {
|
||||||
return openerp.web.datetime_to_str(facet.get('json'));
|
return instance.web.datetime_to_str(facet.get('json'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.ManyToOneField = openerp.web.search.CharField.extend({
|
instance.web.search.ManyToOneField = instance.web.search.CharField.extend({
|
||||||
init: function (view_section, field, view) {
|
init: function (view_section, field, view) {
|
||||||
this._super(view_section, field, view);
|
this._super(view_section, field, view);
|
||||||
this.model = new openerp.web.Model(this.attrs.relation);
|
this.model = new instance.web.Model(this.attrs.relation);
|
||||||
},
|
},
|
||||||
complete: function (needle) {
|
complete: function (needle) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -1289,7 +1289,7 @@ openerp.web.search.ManyToOneField = openerp.web.search.CharField.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
openerp.web.search.Advanced = openerp.web.search.Input.extend({
|
instance.web.search.Advanced = instance.web.search.Input.extend({
|
||||||
template: 'SearchView.advanced',
|
template: 'SearchView.advanced',
|
||||||
start: function () {
|
start: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -1314,7 +1314,7 @@ openerp.web.search.Advanced = openerp.web.search.Input.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
append_proposition: function () {
|
append_proposition: function () {
|
||||||
return (new openerp.web.search.ExtendedSearchProposition(this, this.fields))
|
return (new instance.web.search.ExtendedSearchProposition(this, this.fields))
|
||||||
.appendTo(this.$element.find('ul'));
|
.appendTo(this.$element.find('ul'));
|
||||||
},
|
},
|
||||||
commit_search: function () {
|
commit_search: function () {
|
||||||
|
@ -1323,14 +1323,14 @@ openerp.web.search.Advanced = openerp.web.search.Input.extend({
|
||||||
var children = this.getChildren(),
|
var children = this.getChildren(),
|
||||||
domain = _.invoke(children, 'get_proposition');
|
domain = _.invoke(children, 'get_proposition');
|
||||||
var filters = _(domain).map(function (section) {
|
var filters = _(domain).map(function (section) {
|
||||||
return new openerp.web.search.Filter({attrs: {
|
return new instance.web.search.Filter({attrs: {
|
||||||
string: _.str.sprintf('%s(%s)%s',
|
string: _.str.sprintf('%s(%s)%s',
|
||||||
section[0], section[1], section[2]),
|
section[0], section[1], section[2]),
|
||||||
domain: [section]
|
domain: [section]
|
||||||
}}, self.view);
|
}}, self.view);
|
||||||
});
|
});
|
||||||
// Create Filter (& FilterGroup around it) with that domain
|
// Create Filter (& FilterGroup around it) with that domain
|
||||||
var f = new openerp.web.search.FilterGroup(filters, this.view);
|
var f = new instance.web.search.FilterGroup(filters, this.view);
|
||||||
// add group to query
|
// add group to query
|
||||||
this.view.vs.searchQuery.add({
|
this.view.vs.searchQuery.add({
|
||||||
category: _t("Advanced"),
|
category: _t("Advanced"),
|
||||||
|
@ -1349,11 +1349,11 @@ openerp.web.search.Advanced = openerp.web.search.Input.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/** @lends openerp.web.search.ExtendedSearchProposition# */{
|
instance.web.search.ExtendedSearchProposition = instance.web.OldWidget.extend(/** @lends instance.web.search.ExtendedSearchProposition# */{
|
||||||
template: 'SearchView.extended_search.proposition',
|
template: 'SearchView.extended_search.proposition',
|
||||||
/**
|
/**
|
||||||
* @constructs openerp.web.search.ExtendedSearchProposition
|
* @constructs instance.web.search.ExtendedSearchProposition
|
||||||
* @extends openerp.web.OldWidget
|
* @extends instance.web.OldWidget
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent
|
||||||
* @param fields
|
* @param fields
|
||||||
|
@ -1401,10 +1401,10 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
|
||||||
}
|
}
|
||||||
|
|
||||||
var type = field.type;
|
var type = field.type;
|
||||||
var obj = openerp.web.search.custom_filters.get_object(type);
|
var obj = instance.web.search.custom_filters.get_object(type);
|
||||||
if(obj === null) {
|
if(obj === null) {
|
||||||
console.log('Unknow field type ' + e.key);
|
console.log('Unknow field type ' + e.key);
|
||||||
obj = openerp.web.search.custom_filters.get_object("char");
|
obj = instance.web.search.custom_filters.get_object("char");
|
||||||
}
|
}
|
||||||
this.value = new (obj) (this);
|
this.value = new (obj) (this);
|
||||||
if(this.value.set_field) {
|
if(this.value.set_field) {
|
||||||
|
@ -1430,12 +1430,12 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
openerp.web.search.ExtendedSearchProposition.Field = openerp.web.OldWidget.extend({
|
instance.web.search.ExtendedSearchProposition.Field = instance.web.OldWidget.extend({
|
||||||
start: function () {
|
start: function () {
|
||||||
this.$element = $("#" + this.element_id);
|
this.$element = $("#" + this.element_id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.ExtendedSearchProposition.Char = openerp.web.search.ExtendedSearchProposition.Field.extend({
|
instance.web.search.ExtendedSearchProposition.Char = instance.web.search.ExtendedSearchProposition.Field.extend({
|
||||||
template: 'SearchView.extended_search.proposition.char',
|
template: 'SearchView.extended_search.proposition.char',
|
||||||
operators: [
|
operators: [
|
||||||
{value: "ilike", text: _lt("contains")},
|
{value: "ilike", text: _lt("contains")},
|
||||||
|
@ -1447,7 +1447,7 @@ openerp.web.search.ExtendedSearchProposition.Char = openerp.web.search.ExtendedS
|
||||||
return this.$element.val();
|
return this.$element.val();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.ExtendedSearchProposition.DateTime = openerp.web.search.ExtendedSearchProposition.Field.extend({
|
instance.web.search.ExtendedSearchProposition.DateTime = instance.web.search.ExtendedSearchProposition.Field.extend({
|
||||||
template: 'SearchView.extended_search.proposition.empty',
|
template: 'SearchView.extended_search.proposition.empty',
|
||||||
operators: [
|
operators: [
|
||||||
{value: "=", text: _lt("is equal to")},
|
{value: "=", text: _lt("is equal to")},
|
||||||
|
@ -1462,11 +1462,11 @@ openerp.web.search.ExtendedSearchProposition.DateTime = openerp.web.search.Exten
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
this._super();
|
this._super();
|
||||||
this.datewidget = new openerp.web.DateTimeWidget(this);
|
this.datewidget = new instance.web.DateTimeWidget(this);
|
||||||
this.datewidget.prependTo(this.$element);
|
this.datewidget.prependTo(this.$element);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.ExtendedSearchProposition.Date = openerp.web.search.ExtendedSearchProposition.Field.extend({
|
instance.web.search.ExtendedSearchProposition.Date = instance.web.search.ExtendedSearchProposition.Field.extend({
|
||||||
template: 'SearchView.extended_search.proposition.empty',
|
template: 'SearchView.extended_search.proposition.empty',
|
||||||
operators: [
|
operators: [
|
||||||
{value: "=", text: _lt("is equal to")},
|
{value: "=", text: _lt("is equal to")},
|
||||||
|
@ -1481,11 +1481,11 @@ openerp.web.search.ExtendedSearchProposition.Date = openerp.web.search.ExtendedS
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
this._super();
|
this._super();
|
||||||
this.datewidget = new openerp.web.DateWidget(this);
|
this.datewidget = new instance.web.DateWidget(this);
|
||||||
this.datewidget.prependTo(this.$element);
|
this.datewidget.prependTo(this.$element);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.ExtendedSearchProposition.Integer = openerp.web.search.ExtendedSearchProposition.Field.extend({
|
instance.web.search.ExtendedSearchProposition.Integer = instance.web.search.ExtendedSearchProposition.Field.extend({
|
||||||
template: 'SearchView.extended_search.proposition.integer',
|
template: 'SearchView.extended_search.proposition.integer',
|
||||||
operators: [
|
operators: [
|
||||||
{value: "=", text: _lt("is equal to")},
|
{value: "=", text: _lt("is equal to")},
|
||||||
|
@ -1497,16 +1497,16 @@ openerp.web.search.ExtendedSearchProposition.Integer = openerp.web.search.Extend
|
||||||
],
|
],
|
||||||
get_value: function() {
|
get_value: function() {
|
||||||
try {
|
try {
|
||||||
return openerp.web.parse_value(this.$element.val(), {'widget': 'integer'});
|
return instance.web.parse_value(this.$element.val(), {'widget': 'integer'});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.ExtendedSearchProposition.Id = openerp.web.search.ExtendedSearchProposition.Integer.extend({
|
instance.web.search.ExtendedSearchProposition.Id = instance.web.search.ExtendedSearchProposition.Integer.extend({
|
||||||
operators: [{value: "=", text: _lt("is")}]
|
operators: [{value: "=", text: _lt("is")}]
|
||||||
});
|
});
|
||||||
openerp.web.search.ExtendedSearchProposition.Float = openerp.web.search.ExtendedSearchProposition.Field.extend({
|
instance.web.search.ExtendedSearchProposition.Float = instance.web.search.ExtendedSearchProposition.Field.extend({
|
||||||
template: 'SearchView.extended_search.proposition.float',
|
template: 'SearchView.extended_search.proposition.float',
|
||||||
operators: [
|
operators: [
|
||||||
{value: "=", text: _lt("is equal to")},
|
{value: "=", text: _lt("is equal to")},
|
||||||
|
@ -1518,13 +1518,13 @@ openerp.web.search.ExtendedSearchProposition.Float = openerp.web.search.Extended
|
||||||
],
|
],
|
||||||
get_value: function() {
|
get_value: function() {
|
||||||
try {
|
try {
|
||||||
return openerp.web.parse_value(this.$element.val(), {'widget': 'float'});
|
return instance.web.parse_value(this.$element.val(), {'widget': 'float'});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.ExtendedSearchProposition.Selection = openerp.web.search.ExtendedSearchProposition.Field.extend({
|
instance.web.search.ExtendedSearchProposition.Selection = instance.web.search.ExtendedSearchProposition.Field.extend({
|
||||||
template: 'SearchView.extended_search.proposition.selection',
|
template: 'SearchView.extended_search.proposition.selection',
|
||||||
operators: [
|
operators: [
|
||||||
{value: "=", text: _lt("is")},
|
{value: "=", text: _lt("is")},
|
||||||
|
@ -1537,7 +1537,7 @@ openerp.web.search.ExtendedSearchProposition.Selection = openerp.web.search.Exte
|
||||||
return this.$element.val();
|
return this.$element.val();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openerp.web.search.ExtendedSearchProposition.Boolean = openerp.web.search.ExtendedSearchProposition.Field.extend({
|
instance.web.search.ExtendedSearchProposition.Boolean = instance.web.search.ExtendedSearchProposition.Field.extend({
|
||||||
template: 'SearchView.extended_search.proposition.boolean',
|
template: 'SearchView.extended_search.proposition.boolean',
|
||||||
operators: [
|
operators: [
|
||||||
{value: "=", text: _lt("is true")},
|
{value: "=", text: _lt("is true")},
|
||||||
|
@ -1548,21 +1548,21 @@ openerp.web.search.ExtendedSearchProposition.Boolean = openerp.web.search.Extend
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
openerp.web.search.custom_filters = new openerp.web.Registry({
|
instance.web.search.custom_filters = new instance.web.Registry({
|
||||||
'char': 'openerp.web.search.ExtendedSearchProposition.Char',
|
'char': 'instance.web.search.ExtendedSearchProposition.Char',
|
||||||
'text': 'openerp.web.search.ExtendedSearchProposition.Char',
|
'text': 'instance.web.search.ExtendedSearchProposition.Char',
|
||||||
'one2many': 'openerp.web.search.ExtendedSearchProposition.Char',
|
'one2many': 'instance.web.search.ExtendedSearchProposition.Char',
|
||||||
'many2one': 'openerp.web.search.ExtendedSearchProposition.Char',
|
'many2one': 'instance.web.search.ExtendedSearchProposition.Char',
|
||||||
'many2many': 'openerp.web.search.ExtendedSearchProposition.Char',
|
'many2many': 'instance.web.search.ExtendedSearchProposition.Char',
|
||||||
|
|
||||||
'datetime': 'openerp.web.search.ExtendedSearchProposition.DateTime',
|
'datetime': 'instance.web.search.ExtendedSearchProposition.DateTime',
|
||||||
'date': 'openerp.web.search.ExtendedSearchProposition.Date',
|
'date': 'instance.web.search.ExtendedSearchProposition.Date',
|
||||||
'integer': 'openerp.web.search.ExtendedSearchProposition.Integer',
|
'integer': 'instance.web.search.ExtendedSearchProposition.Integer',
|
||||||
'float': 'openerp.web.search.ExtendedSearchProposition.Float',
|
'float': 'instance.web.search.ExtendedSearchProposition.Float',
|
||||||
'boolean': 'openerp.web.search.ExtendedSearchProposition.Boolean',
|
'boolean': 'instance.web.search.ExtendedSearchProposition.Boolean',
|
||||||
'selection': 'openerp.web.search.ExtendedSearchProposition.Selection',
|
'selection': 'instance.web.search.ExtendedSearchProposition.Selection',
|
||||||
|
|
||||||
'id': 'openerp.web.search.ExtendedSearchProposition.Id'
|
'id': 'instance.web.search.ExtendedSearchProposition.Id'
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue