From d40534e8fadf0a11034010bb27b53b8b70290294 Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 19 Sep 2019 15:21:52 +0200 Subject: [PATCH] FIX : change product type must be allowed if we activate hidden conf --- htdocs/product/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 1e6995fff35..f03a6db0e17 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1597,7 +1597,9 @@ else { // TODO change for compatibility with edit in place $typeformat='select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); - print ''.$form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat).''; + print ''; + print (!empty($conf->global->MAIN_ALLOW_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type'); + print ''; print $form->editfieldval("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat); print ''; }