Merge pull request #7436 from fappels/6.0_Fix_expedition_error_handling
Fix batch required for lot product error message.
This commit is contained in:
commit
fc5c9ad2f2
@ -156,7 +156,7 @@ ErrorPriceExpression22=Negative result '%s'
|
||||
ErrorPriceExpressionInternal=Internal error '%s'
|
||||
ErrorPriceExpressionUnknown=Unknown error '%s'
|
||||
ErrorSrcAndTargetWarehouseMustDiffers=Source and target warehouses must differs
|
||||
ErrorTryToMakeMoveOnProductRequiringBatchData=Error, trying to make a stock movement without lot/serial information, on a product requiring lot/serial information
|
||||
ErrorTryToMakeMoveOnProductRequiringBatchData=Error, trying to make a stock movement without lot/serial information, on product '%s' requiring lot/serial information
|
||||
ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified (approved or denied) before being allowed to do this action
|
||||
ErrorCantSetReceptionToTotalDoneWithReceptionDenied=All recorded receptions must first be verified (approved) before being allowed to do this action
|
||||
ErrorGlobalVariableUpdater0=HTTP request failed with error '%s'
|
||||
|
||||
@ -96,6 +96,7 @@ class MouvementStock extends CommonObject
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
|
||||
$langs->load("errors");
|
||||
$error = 0;
|
||||
dol_syslog(get_class($this)."::_create start userid=$user->id, fk_product=$fk_product, warehouse_id=$entrepot_id, qty=$qty, type=$type, price=$price, label=$label, inventorycode=$inventorycode, datem=".$datem.", eatby=".$eatby.", sellby=".$sellby.", batch=".$batch.", skip_batch=".$skip_batch);
|
||||
|
||||
@ -141,7 +142,7 @@ class MouvementStock extends CommonObject
|
||||
{
|
||||
if (empty($batch))
|
||||
{
|
||||
$this->errors[]=$langs->trans("ErrorTryToMakeMoveOnProductRequiringBatchData", $product->name);
|
||||
$this->errors[]=$langs->trans("ErrorTryToMakeMoveOnProductRequiringBatchData", $product->ref);
|
||||
dol_syslog("Try to make a movement of a product with status_batch on without any batch data");
|
||||
|
||||
$this->db->rollback();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user