From c35b45445567a07b45e1a0c4212c97e7e3be06d3 Mon Sep 17 00:00:00 2001 From: All-3kcis Date: Thu, 12 Apr 2018 17:13:42 +0200 Subject: [PATCH] Fix bug productlot created without entity --- htdocs/product/stock/class/mouvementstock.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index ab2b60f564a..f27dfa4a70e 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -249,6 +249,7 @@ class MouvementStock extends CommonObject else // If not found, we add record { $productlot = new Productlot($this->db); + $productlot->entity = $conf->entity; $productlot->fk_product = $fk_product; $productlot->batch = $batch; // If we are here = first time we manage this batch, so we used dates provided by users to create lot