From b8f38d96ef153758abcf7f1efad2ac8c4f1fddc9 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Mon, 29 Dec 2025 00:21:39 +0100 Subject: [PATCH] 28_12_25 --- tryton-sao.js | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/tryton-sao.js b/tryton-sao.js index c2e6dcf..f7f889b 100644 --- a/tryton-sao.js +++ b/tryton-sao.js @@ -20672,36 +20672,16 @@ function eval_pyson(value){ }); - // window.addEventListener("message", function (event) { - // if (event.data?.type === "open_tab") { - // const { model, res_id, view_mode, domain } = event.data.payload || {}; - - // Sao.Tab.create({ - // model: model, - // res_id: res_id, - // mode: [view_mode], - // domain: domain, - // target: "new", - // }); - // } - // }); - window.addEventListener("message", function (event) { if (event.data?.type === "open_tab") { + const { model, res_id, view_mode, domain } = event.data.payload || {}; - const { model, domain } = event.data.payload || {}; - - Sao.Action.exec({ - name: "Dashboard", - type: "ir.action.act_window", - res_model: model, - domain: domain || [], - views: [ - [null, "tree"], - [null, "form"] - ], - target: "current", - context: {} + Sao.Tab.create({ + model: model, + res_id: res_id, + mode: ['form', 'tree'], + domain: domain, + target: "new", }); } });