diff --git a/tryton-sao.js b/tryton-sao.js index 1d487fa..e37f4df 100644 --- a/tryton-sao.js +++ b/tryton-sao.js @@ -20674,7 +20674,7 @@ 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 || {}; + const { model, res_id, view_mode, domain, context } = event.data.payload || {}; Sao.Tab.create({ model: model, @@ -20685,24 +20685,14 @@ function eval_pyson(value){ }); } if (event.data?.type === "exec_window"){ - const { model, res_id, view_mode, domain } = event.data.payload || {}; + const { model, res_id, view_mode, domain, context } = event.data.payload || {}; var action = { - // id: 'act_allocation_matched_form', type: 'ir.action.act_window', - // name: 'Lots matched', - res_model: 'lot.report', + res_model: model, - pyson_domain: '[["r_lot_matched", ">", 0]]', + pyson_domain: domain, - pyson_context: JSON.stringify({ - purchase: null, - sale: null, - shipment: null, - type: 'matched', - state: 'all', - wh: 'all', - group: 'by_physic' - }), + pyson_context: JSON.stringify(context), pyson_order: 'null', pyson_search_value: '[]',