From f757b08f97ef293a4f09978f5fc6b1f9ea9d7fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 27 Nov 2025 14:50:14 +0100 Subject: [PATCH] add project --- htdocs/core/class/html.formfile.class.php | 3 ++- htdocs/projet/card.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index d0d59dcdeaa..1a6d66e60c7 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -507,8 +507,9 @@ class FormFile } $printer = 0; + $modulepartssupported = ['project', 'contract', 'facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'delivery', 'ticket', 'bom', 'mrp:mo']; // The direct print feature is implemented only for such elements - if (in_array($modulepart, array('contract', 'facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'delivery', 'ticket', 'bom', 'mrp:mo'))) { + if (in_array($modulepart, $modulepartssupported)) { $printer = ($user->hasRight('printing', 'read') && isModEnabled('printing')); } diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index e97160987bf..b53a8ee9954 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -614,6 +614,9 @@ if (empty($reshook)) { } } + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + // Actions to send emails $triggersendname = 'PROJECT_SENTBYMAIL'; $paramname = 'id';