From 57bb8bcfcdabc6324990e9a636b1d480818476c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Oct 2018 20:27:33 +0200 Subject: [PATCH] Disabled action are hidden with reason --- htdocs/product/stock/product.php | 34 +++++++++++++++++++++++++------- htdocs/variants/combinations.php | 13 +++++++----- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index dc291eb0fdc..70a37a4bba6 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -766,17 +766,37 @@ if (empty($reshook)) { print "
\n"; - if (! $variants) { - - if ($user->rights->stock->mouvement->creer) { + if ($user->rights->stock->mouvement->creer) + { + if (! $variants) { print '' . $langs->trans("CorrectStock") . ''; } - - //if (($user->rights->stock->mouvement->creer) && ! $object->hasbatch()) - if ($user->rights->stock->mouvement->creer) { - print '' . $langs->trans("TransferStock") . ''; + else + { + print '' . $langs->trans("CorrectStock") . ''; } } + else + { + print '' . $langs->trans("CorrectStock") . ''; + } + + //if (($user->rights->stock->mouvement->creer) && ! $object->hasbatch()) + if ($user->rights->stock->mouvement->creer) + { + if (! $variants) { + print '' . $langs->trans("TransferStock") . ''; + } + else + { + print '' . $langs->trans("TransferStock") . ''; + } + } + else + { + print '' . $langs->trans("CorrectStock") . ''; + } + print '
'; } diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index f5c0d813995..848e5ee70fe 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -326,7 +326,7 @@ if (! empty($id) || ! empty($ref)) if ($action == 'add') { $title = $langs->trans('NewProductCombination'); - print dol_fiche_head(); + //print dol_fiche_head(); $features = $_SESSION['addvariant_'.$object->id]; //First, sanitize print '
'; @@ -347,7 +347,8 @@ if (! empty($id) || ! empty($ref)) } } print '
'; - print dol_fiche_end(); + print '

'; + //print dol_fiche_end(); } else { $title = $langs->trans('EditProductCombination'); } @@ -633,12 +634,14 @@ if (! empty($id) || ! empty($ref)) print '
'; print '
'; - if ($productCombinations) { - print ''.$langs->trans('PropagateVariant').''; - } print ''.$langs->trans('NewProductCombination').''; // NewVariant + if ($productCombinations) + { + print ''.$langs->trans('PropagateVariant').''; + } + // Too much bugged page. /* print ''.$langs->trans('ProductCombinationGenerator').'';