Fix if we insert a product already the product to produce

This commit is contained in:
Laurent Destailleur 2019-11-29 23:51:46 +01:00
parent fe815ed432
commit eb69538d17
2 changed files with 6 additions and 0 deletions

View File

@ -146,6 +146,11 @@ if (empty($reshook))
$error++;
}
if ($object->fk_product == $idprod) {
setEventMessages($langs->trans('TheProductXIsAlreadyTheProductToProduce'), null, 'errors');
$error++;
}
if (!$error)
{
$bomline = new BOMLine($db);

View File

@ -52,3 +52,4 @@ WarehouseForProduction=Warehouse for production
CreateMO=Create MO
ToConsume=A consommer
Manufactured=Fabriqué
TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce.