[FIX] correctly display the searchview/drawer (addon web)
the searchview has been splitted in two widgets: SearchView and SearchViewDrawer. They are dependent of each other, so a drawer has to be created for each searchview. This was not the case in some form views (inline, created by a wizard).
This commit is contained in:
parent
72f532a463
commit
1c32d93115
|
@ -1781,6 +1781,7 @@
|
|||
overflow: auto;
|
||||
}
|
||||
.openerp .oe_searchview_drawer {
|
||||
width: 100%;
|
||||
cursor: default;
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -1462,6 +1462,7 @@ $sheet-padding: 16px
|
|||
border-bottom: 1px solid $tag-border
|
||||
overflow: auto
|
||||
.oe_searchview_drawer
|
||||
width: 100%
|
||||
cursor: default
|
||||
display: none
|
||||
overflow: hidden
|
||||
|
|
|
@ -831,7 +831,7 @@ instance.web.SearchViewDrawer = instance.web.Widget.extend({
|
|||
},
|
||||
notify_searchview: function () {
|
||||
var defaults = arguments[1];
|
||||
this.searchview.drawer_ready.resolve.apply(null, defaults);
|
||||
this.ready.resolve.apply(null, defaults);
|
||||
},
|
||||
/**
|
||||
* Sets up thingie where all the mess is put?
|
||||
|
|
|
@ -5295,8 +5295,12 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
|
|||
if (this.searchview) {
|
||||
this.searchview.destroy();
|
||||
}
|
||||
if (this.searchview_drawer) {
|
||||
this.searchview_drawer.destroy();
|
||||
}
|
||||
this.searchview = new instance.web.SearchView(this,
|
||||
this.dataset, false, search_defaults);
|
||||
this.searchview_drawer = new instance.web.SearchViewDrawer(this, this.searchview);
|
||||
this.searchview.on('search_data', self, function(domains, contexts, groupbys) {
|
||||
if (self.initial_ids) {
|
||||
self.do_search(domains.concat([[["id", "in", self.initial_ids]], self.domain]),
|
||||
|
@ -5343,6 +5347,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
|
|||
});
|
||||
});
|
||||
this.searchview.appendTo($(".oe_popup_search", self.$el));
|
||||
this.searchview_drawer.appendTo($(".oe_popup_search", self.$el));
|
||||
},
|
||||
do_search: function(domains, contexts, groupbys) {
|
||||
var self = this;
|
||||
|
|
Loading…
Reference in New Issue