If anybody searches a solution for this.
Here is a js snippet tested on odoo 15
Copy it to a file and make sure to load the file via __manifest__.py
Last thing to do: Change "from.model" and "to.model" to the one you need
odoo.define("nona.redirectToProduct", function (require) {
"use strict";
var ListRenderer = require("web.ListRenderer");
ListRenderer.include({
_renderRow: function (record) {
let row = this._super(record);
var self = this;
if (record.model == "from.model") {
row.addClass('o_list_no_open');
// add click event
row.bind({
click: function (ev) {
ev.preventDefault();
ev.stopPropagation();
self.do_action({
type: "ir.actions.act_window",
res_model: "to.model",
res_id: record.data.product_id,
views: [[false, "form"]],
target: "target",
context: record.context || {},
});
}
});
}
return row
},
});
});