\n";
-}
+/*} */
// Title rule for stock decrease
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index 66f47861bdf..578bc15d1a4 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -72,4 +72,6 @@ AverageUnitPricePMP=Average input price
EstimatedStockValueShort=Estimated value of stock
EstimatedStockValue=Estimated value of stock
DeleteAWarehouse=Delete a warehouse
-ConfirmDeleteWarehouse=Are you sure you want to delete the warehouse %s ?
\ No newline at end of file
+ConfirmDeleteWarehouse=Are you sure you want to delete the warehouse %s ?
+PersonalStock=Personal stock %s
+ThisWarehouseIsPersonalStock=This warehouse represents personal stock of %s %s
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang
index d18a1b0e1b9..511478e4c9e 100644
--- a/htdocs/langs/fr_FR/stocks.lang
+++ b/htdocs/langs/fr_FR/stocks.lang
@@ -38,7 +38,7 @@ EnhancedValue=Valorisation
PMPValue=Valorisation (PMP)
PMPValueShort=PMP
EnhancedValueOfWarehouses=Valorisation des stocks
-UserWarehouseAutoCreate=Créer un stock automatiquement à la création d'un utilisateur
+UserWarehouseAutoCreate=Créer un stock/entrepot propre à l'utilisateur automatiquement à la création de cet utilisateur
QtyDispatched=Quantité ventilée
OrderDispatch=Réception vers stocks
RuleForStockManagementDecrease=Règle de gestion des décrémentations de stock
@@ -72,4 +72,6 @@ AverageUnitPricePMP=Prix moyen pondéré (PMP) d'aquisition
EstimatedStockValueShort=Valorisation (PMP)
EstimatedStockValue=Valorisation acquisition stock (PMP)
DeleteAWarehouse=Supprimer un entrepôt
-ConfirmDeleteWarehouse=Êtes-vous sûr de vouloir supprimer l'entrepôt %s ?
\ No newline at end of file
+ConfirmDeleteWarehouse=Êtes-vous sûr de vouloir supprimer l'entrepôt %s ?
+PersonalStock=Stock personnel %s
+ThisWarehouseIsPersonalStock=Cet entrepôt représente le stock personnel de %s %s
\ No newline at end of file
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 49e76e71a65..824e01dc5ad 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -750,12 +750,13 @@ class User extends CommonObject
return -4;
}
- if (! empty($conf->global->STOCK_USERSTOCK) && ! empty($conf->global->STOCK_USERSTOCK_AUTOCREATE))
+ if (! empty($conf->global->STOCK_USERSTOCK_AUTOCREATE))
{
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/entrepot.class.php");
+ $langs->load("stocks");
$entrepot = new Entrepot($this->db);
- $entrepot->libelle = 'Stock Personnel '.$this->nom;
- $entrepot->description = 'Cet entrepot represente le stock personnel de '.$this->prenom.' '.$this->nom;
+ $entrepot->libelle = $langs->trans("PersonalStock",$this->nom);
+ $entrepot->description = $langs->trans("ThisWarehouseIsPersonalStock",$this->prenom,$this->nom);
$entrepot->statut = 1;
$entrepot->create($user);
}