3
0
Fork 0

[IMP] web_widget_open_tab: keep breadcrumb

14.0
Adrià Gil Sorribes 2020-01-08 16:32:25 +01:00 committed by Raf Ven
parent 078f2395e9
commit 652b31db40
1 changed files with 4 additions and 5 deletions

View File

@ -14,12 +14,9 @@ odoo.define('web_widget_open_tab.FieldOpen', function(require) {
isSet: function () {
return true;
},
_getReference: function () {
return 'model=' + this.model + '&id=' + this.res_id;
},
_renderReadonly: function () {
var $content = $(
'<a href="#' + this._getReference() + '">'
'<a href="#">'
).addClass('fa fa-eye');
this.$el.append($content)
},
@ -28,7 +25,9 @@ odoo.define('web_widget_open_tab.FieldOpen', function(require) {
ev.stopPropagation();
var element = $(ev.currentTarget).find('a');
if (element != null && element[0].href != null) {
window.open(element[0].href);
var url = new URL(window.location.href);
var href = url.hash.replace("list", "form") + '&id=' + this.res_id;
window.open(href);
}
},
});