diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang
index 4414b6ad8d8..644da334851 100644
--- a/htdocs/langs/en_US/productbatch.lang
+++ b/htdocs/langs/en_US/productbatch.lang
@@ -28,8 +28,8 @@ SerialNumberAlreadyInUse=Serial number %s is already used for product %s
TooManyQtyForSerialNumber=You can only have one product %s for serial number %s
BatchLotNumberingModules=Options for automatic generation of batch products managed by lots
BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers
+ManageLotMask=Custom mask
CustomMasks=Adds an option to define mask in the product card
LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask
SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask
-QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
-
+QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang
index cd38ac89278..5a1ddd19ae8 100644
--- a/htdocs/langs/fr_FR/productbatch.lang
+++ b/htdocs/langs/fr_FR/productbatch.lang
@@ -28,6 +28,7 @@ SerialNumberAlreadyInUse=Le numéro de série %s est déjà utilisé pour le pro
TooManyQtyForSerialNumber=Vous ne pouvez avoir qu'un produit %s avec le numéro de série %s
BatchLotNumberingModules=Modèle de génération et contrôle des numéros de lot
BatchSerialNumberingModules=Modèle de génération et contrôle des numéros de série
+ManageLotMask=Masque personnalisé
CustomMasks=Ajoute une option pour définir le masque dans la fiche produit
LotProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de lot
-SNProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de série
\ No newline at end of file
+SNProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de série
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 094ce8670a9..64e5b844cb0 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -307,6 +307,7 @@ if (empty($reshook)) {
$object->status = GETPOST('statut');
$object->status_buy = GETPOST('statut_buy');
$object->status_batch = GETPOST('status_batch');
+ $object->batch_mask = GETPOST('batch_mask');
$object->barcode_type = GETPOST('fk_barcode_type');
$object->barcode = GETPOST('barcode');
@@ -475,6 +476,7 @@ if (empty($reshook)) {
$object->status = GETPOST('statut', 'int');
$object->status_buy = GETPOST('statut_buy', 'int');
$object->status_batch = GETPOST('status_batch', 'aZ09');
+ $object->batch_mask = GETPOST('batch_mask', 'alpha');
$object->fk_default_warehouse = GETPOST('fk_default_warehouse');
// removed from update view so GETPOST always empty
/*
@@ -1083,10 +1085,50 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Batch number management
if (!empty($conf->productbatch->enabled)) {
- print '