mirror of https://github.com/OCA/web.git
[IMP] web_widget_open_tab: keep breadcrumb
parent
cb4fa9d6cd
commit
6829873838
|
@ -14,12 +14,9 @@ odoo.define('web_widget_open_tab.FieldOpen', function(require) {
|
||||||
isSet: function () {
|
isSet: function () {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
_getReference: function () {
|
|
||||||
return 'model=' + this.model + '&id=' + this.res_id;
|
|
||||||
},
|
|
||||||
_renderReadonly: function () {
|
_renderReadonly: function () {
|
||||||
var $content = $(
|
var $content = $(
|
||||||
'<a href="#' + this._getReference() + '">'
|
'<a href="#">'
|
||||||
).addClass('fa fa-eye');
|
).addClass('fa fa-eye');
|
||||||
this.$el.append($content)
|
this.$el.append($content)
|
||||||
},
|
},
|
||||||
|
@ -28,7 +25,9 @@ odoo.define('web_widget_open_tab.FieldOpen', function(require) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
var element = $(ev.currentTarget).find('a');
|
var element = $(ev.currentTarget).find('a');
|
||||||
if (element != null && element[0].href != null) {
|
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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue