From 797b9c90548f27755cb5c68c9acb7cd9f780eeb8 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 3 Jan 2023 11:42:39 +0100 Subject: [PATCH] dfelete cem data on product deletion --- htdocs/product/class/product.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 0900f11ed29..e133e1a42f4 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1408,6 +1408,14 @@ class Product extends CommonObject } } + // Delete record into ECM index and physically + if (!$error) { + $res = $this->deleteEcmFiles(0); // Deleting files physically is done later with the dol_delete_dir_recursive + if (!$res) { + $error++; + } + } + if (!$error) { // We remove directory $ref = dol_sanitizeFileName($this->ref);