FIX When delete a product, llx_product_association rows are not deleted
This commit is contained in:
parent
b462e7b217
commit
bdae4e1c4d
@ -1117,7 +1117,7 @@ class Product extends CommonObject
|
|||||||
// Delete from product_association
|
// Delete from product_association
|
||||||
if (!$error){
|
if (!$error){
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_association";
|
$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);
|
dol_syslog(get_class($this).'::delete', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if (! $result)
|
if (! $result)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user