From bdae4e1c4dae0369ef3d0051cf5e8c53572bf7c3 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Wed, 17 Oct 2018 10:04:42 +0200 Subject: [PATCH] FIX When delete a product, llx_product_association rows are not deleted --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 56227bc5266..9a52722a3c9 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1117,7 +1117,7 @@ class Product extends CommonObject // Delete from product_association if (!$error){ $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_association"; - $sql.= " WHERE fk_product_pere = ".$this->rowid." OR fk_product_fils = ".$this->rowid; + $sql.= " WHERE fk_product_pere = ".$this->id." OR fk_product_fils = ".$this->id; dol_syslog(get_class($this).'::delete', LOG_DEBUG); $result = $this->db->query($sql); if (! $result)