diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 0aee9cbfc81..9a449d63700 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1947,23 +1947,6 @@ class Categorie extends CommonObject return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables, 1); } - /** - * Function used to replace a product id with another one. - * - * @param DoliDB $db Database handler - * @param int $origin_id Old product id - * @param int $dest_id New product id - * @return bool - */ - public static function replaceProduct(DoliDB $db, $origin_id, $dest_id) - { - $tables = array( - 'categorie_product' - ); - - return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables); - } - /** * Return the addtional SQL JOIN query for filtering a list by a category * diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 8218e1c6402..8ef7be75f52 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2503,23 +2503,6 @@ class Expedition extends CommonObject return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } - - /** - * Function used to replace a product id with another one. - * - * @param DoliDB $db Database handler - * @param int $origin_id Old product id - * @param int $dest_id New product id - * @return bool - */ - public static function replaceProduct(DoliDB $db, $origin_id, $dest_id) - { - $tables = array( - 'expeditiondet' - ); - - return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables); - } } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 25503bdbf60..874930d2ca9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -311,14 +311,14 @@ if (empty($reshook)) { // TODO add this functionality into the api_products.class.php // TODO Mutualise the list into object product.class.php $objects = array( - 'Categorie' => '/categories/class/categorie.class.php', + // do not use Categorie, it cause foreign key error, merge is done before + //'Categorie' => '/categories/class/categorie.class.php', 'Propal' => '/comm/propal/class/propal.class.php', 'Commande' => '/commande/class/commande.class.php', 'Facture' => '/compta/facture/class/facture.class.php', 'FactureRec' => '/compta/facture/class/facture-rec.class.php', 'Bom' => '/bom/class/bom.class.php', 'Contrat' => '/contrat/class/contrat.class.php', - 'Expedition' => '/expedition/class/expedition.class.php', 'Reception' => '/reception/class/reception.class.php', 'Fichinter' => '/fichinter/class/fichinter.class.php', 'FichinterRec' => '/fichinter/class/fichinter.class.php',