Merge pull request #16606 from tuxgasy/mo_allow_kits_option

Add hidden option ALLOW_USE_KITS_INTO_BOM_AND_MO
This commit is contained in:
Laurent Destailleur 2021-03-10 17:05:45 +01:00 committed by GitHub
commit 13d8807bb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,7 +248,8 @@ class Mo extends CommonObject
$this->db->begin();
if ($this->fk_product > 0) {
// Check that product is not a kit/virtual product
if (empty($conf->global->ALLOW_USE_KITS_INTO_BOM_AND_MO) and $this->fk_product > 0) {
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$tmpproduct = new Product($this->db);
$tmpproduct->fetch($this->fk_product);
@ -260,7 +261,6 @@ class Mo extends CommonObject
}
}
// Check that product is not a kit/virtual product
if (!$error) {
$idcreated = $this->createCommon($user, $notrigger);
if ($idcreated <= 0) {