From 529dfb8dfb0a1ca65a656e10db5d9aae29e57659 Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Tue, 20 Oct 2020 16:37:15 +0200 Subject: [PATCH 1/3] FIX 9.0 - supplier proposals as linked objects of events are not correctly fetched --- htdocs/core/lib/functions2.lib.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 37bc6c1cd5e..739370298c0 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1872,6 +1872,12 @@ function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='') $classpath = 'fourn/class'; $module='fournisseur'; } + elseif ($objecttype == 'supplier_proposal') { + $classfile = 'supplier_proposal'; + $classname = 'SupplierProposal'; + $classpath = 'supplier_proposal/class'; + $module = 'supplier_proposal'; + } elseif ($objecttype == 'stock') { $classpath = 'product/stock/class'; $classfile='entrepot'; From c2ad40043f88598f803f4eb07acef1cced49326f Mon Sep 17 00:00:00 2001 From: Got2be Date: Thu, 22 Oct 2020 16:10:47 +0200 Subject: [PATCH 2/3] FIX : WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING must not consider services while STOCK_SUPPORTS_SERVICES is empty --- .../triggers/interface_20_modWorkflow_WorkflowManager.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index 3af9319c7fa..ca0c4d1f0fc 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -299,6 +299,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers //Build array of quantity ordered by product if (is_array($order->lines) && count($order->lines)>0) { foreach($order->lines as $orderline) { + if(empty($conf->global->STOCK_SUPPORTS_SERVICES) && $orderline->product_type > 0) continue; $qtyordred[$orderline->fk_product]+=$orderline->qty; } } From a9117fe864ffef5a754890d1d145acbe01276697 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Oct 2020 16:18:00 +0200 Subject: [PATCH 3/3] Update interface_20_modWorkflow_WorkflowManager.class.php --- .../triggers/interface_20_modWorkflow_WorkflowManager.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index ca0c4d1f0fc..bbdbc06fd76 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -299,7 +299,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers //Build array of quantity ordered by product if (is_array($order->lines) && count($order->lines)>0) { foreach($order->lines as $orderline) { - if(empty($conf->global->STOCK_SUPPORTS_SERVICES) && $orderline->product_type > 0) continue; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES) && $orderline->product_type > 0) continue; $qtyordred[$orderline->fk_product]+=$orderline->qty; } }