diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index a002d16da876e..c7bbc5ae1fc78 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -793,6 +793,7 @@ public function createProduction(User $user, $notrigger = true) } } } + if (!$error) { $this->db->commit(); return 1; diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index d6300fdb2b587..e232f34aa1c5e 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -146,7 +146,6 @@ // Create MO with Childs if ($action == 'add' && empty($id) && !empty($TBomLineId)) { $noback = 1; - include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; $mo_parent = $object;