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';