diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 2427ac74714..ccb81ad03bc 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -14,7 +14,7 @@ * Copyright (C) 2014 Ion agorria * Copyright (C) 2016-2018 Ferran Marcet * Copyright (C) 2017 Gustavo Novaro - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-2020 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2441,6 +2441,7 @@ class Product extends CommonObject $sql .= " WHERE "; $sql .= " b.entity IN (".getEntity('bom').")"; $sql .= " AND b.fk_product =".$this->id; + $sql .= " GROUP BY b.rowid"; $result = $this->db->query($sql); if ($result) {