This commit is contained in:
2025-12-29 20:57:36 +01:00
parent 5c87c69538
commit 96a19e739e

View File

@@ -42,11 +42,11 @@ function SplashScreen() {
Communication Tryton Communication Tryton
-------------------------- */ -------------------------- */
function openInTryton(model, res_id, view_mode = ['tree'], domain, message = "open_tab") { function openInTryton(model, res_id, view_mode = ['tree'], domain, message = "open_tab", context = {}) {
window.parent.postMessage( window.parent.postMessage(
{ {
type: message, type: message,
payload: { model, res_id, view_mode, domain }, payload: { model, res_id, view_mode, domain, context },
}, },
"*" "*"
); );
@@ -105,7 +105,15 @@ const shipmentData = [
]; ];
const lotData = [ const lotData = [
{ status: "Matched", count: lot_m, color: "bg-teal-500", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window2')}, { status: "Matched", count: lot_m, color: "bg-teal-500", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[["r_lot_matched", ">", 0]],'exec_window',{
purchase: null,
sale: null,
shipment: null,
type: 'matched',
state: 'all',
wh: 'all',
group: 'by_physic'
})},
{ status: "Available", count: lot_a, color: "bg-cyan-500", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window') }, { status: "Available", count: lot_a, color: "bg-cyan-500", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window') },
{ status: "All", count: lot_al, color: "bg-blue-500", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window') }, { status: "All", count: lot_al, color: "bg-blue-500", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window') },
]; ];