mirror of https://github.com/OCA/web.git
[FIX] eval search view's domain
parent
777c9d3eea
commit
f233b91782
|
@ -209,6 +209,7 @@ openerp.web_advanced_search_x2x = function(instance)
|
||||||
{
|
{
|
||||||
self.$buttonpane.find(".oe_selectcreatepopup-search-create").remove();
|
self.$buttonpane.find(".oe_selectcreatepopup-search-create").remove();
|
||||||
self.$buttonpane.prepend(
|
self.$buttonpane.prepend(
|
||||||
|
//TODO: take care that this is only clicked if we have a domain
|
||||||
jQuery('<button />')
|
jQuery('<button />')
|
||||||
.addClass('oe_highlight')
|
.addClass('oe_highlight')
|
||||||
.text(instance.web._lt('Use criteria'))
|
.text(instance.web._lt('Use criteria'))
|
||||||
|
@ -239,9 +240,16 @@ openerp.web_advanced_search_x2x = function(instance)
|
||||||
{
|
{
|
||||||
var self = this,
|
var self = this,
|
||||||
search = this.searchview.build_search_data();
|
search = this.searchview.build_search_data();
|
||||||
//TODO: get representation from search view
|
instance.web.pyeval.eval_domains_and_contexts({
|
||||||
self.trigger('domain_selected', search.domain, String(search.domain));
|
domains: search.domains,
|
||||||
self.destroy();
|
contexts: search.contexts,
|
||||||
|
groupbys: search.groupbys || []
|
||||||
|
}).then(function(search)
|
||||||
|
{
|
||||||
|
//TODO: get representation from search view
|
||||||
|
self.trigger('domain_selected', search.domain, String(search.domain));
|
||||||
|
self.destroy();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
select_elements: function(ids)
|
select_elements: function(ids)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue