diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 188670b619e..05c8866bab0 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1099,7 +1099,7 @@ else
if ($commande->statut == 1 || $commande->statut == 2)
{
- if ($user->rights->commande->creer)
+ if ($user->rights->commande->cloturer)
{
print ''.$langs->trans('Close').'';
}
@@ -1108,7 +1108,7 @@ else
if ($commande->statut == 1)
{
$nb_expedition = $commande->nb_expedition();
- if ($user->rights->commande->valider && $nb_expedition == 0)
+ if ($user->rights->commande->annuler && $nb_expedition == 0)
{
print ''.$langs->trans('CancelOrder').'';
}
diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php
index 11ebc66f9bc..8f2a0b158d0 100644
--- a/htdocs/includes/modules/modCommande.class.php
+++ b/htdocs/includes/modules/modCommande.class.php
@@ -101,28 +101,46 @@ class modCommande extends DolibarrModules
$this->rights_class = 'commande';
$this->rights[1][0] = 81;
- $this->rights[1][1] = 'Lire les commandes';
+ $this->rights[1][1] = 'Lire les commandes clients';
$this->rights[1][2] = 'r';
$this->rights[1][3] = 1;
$this->rights[1][4] = 'lire';
$this->rights[2][0] = 82;
- $this->rights[2][1] = 'Créer modifier les commandes';
+ $this->rights[2][1] = 'Créer modifier les commandes clients';
$this->rights[2][2] = 'w';
$this->rights[2][3] = 0;
$this->rights[2][4] = 'creer';
$this->rights[3][0] = 84;
- $this->rights[3][1] = 'Valider les commandes';
+ $this->rights[3][1] = 'Valider les commandes clients';
$this->rights[3][2] = 'd';
$this->rights[3][3] = 0;
$this->rights[3][4] = 'valider';
-
- $this->rights[4][0] = 89;
- $this->rights[4][1] = 'Supprimer les commandes';
+
+ $this->rights[4][0] = 86;
+ $this->rights[4][1] = 'Envoyer les commandes clients';
$this->rights[4][2] = 'd';
$this->rights[4][3] = 0;
- $this->rights[4][4] = 'supprimer';
+ $this->rights[4][4] = 'envoyer';
+
+ $this->rights[5][0] = 87;
+ $this->rights[5][1] = 'Clôturer les commandes clients';
+ $this->rights[5][2] = 'd';
+ $this->rights[5][3] = 0;
+ $this->rights[5][4] = 'cloturer';
+
+ $this->rights[6][0] = 88;
+ $this->rights[6][1] = 'Annuler les commandes clients';
+ $this->rights[6][2] = 'd';
+ $this->rights[6][3] = 0;
+ $this->rights[6][4] = 'annuler';
+
+ $this->rights[7][0] = 89;
+ $this->rights[7][1] = 'Supprimer les commandes clients';
+ $this->rights[7][2] = 'd';
+ $this->rights[7][3] = 0;
+ $this->rights[7][4] = 'supprimer';
}
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 350256958f8..6e048909f24 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -168,7 +168,10 @@ Permission79=Create/modify subscriptions
Permission81=Read customers orders
Permission82=Create/modify customers orders
Permission84=Validate customers orders
-Permission89=Cancel customers orders
+Permission86=Send customers orders
+Permission87=Close customers orders
+Permission88=Cancel customers orders
+Permission89=Delete customers orders
Permission91=Read charges and vat
Permission92=Create/modify charges and vat
Permission93=Delete charges and vat
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 431d104818f..7118ca396f4 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -168,7 +168,10 @@ Permission79=Cr
Permission81=Consulter les commandes clients
Permission82=Créer/modifier les commandes clients
Permission84=Valider les commandes clients
-Permission89=Annuler les commandes clients
+Permission86=Envoyer les commandes clients
+Permission87=Clôturer les commandes clients
+Permission88=Annuler les commandes clients
+Permission89=Supprimer les commandes clients
Permission91=Consulter les charges et la TVA
Permission92=Créer/modifier les charges et la TVA
Permission93=Supprimer les charges et la TVA