';
diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php
index 9ef77fb0d98..8256019bd98 100644
--- a/htdocs/bom/tpl/objectline_view.tpl.php
+++ b/htdocs/bom/tpl/objectline_view.tpl.php
@@ -80,9 +80,22 @@ print '';
$coldisplay++;
$tmpproduct = new Product($object->db);
$tmpproduct->fetch($line->fk_product);
+$tmpbom = new BOM($object->db);
+$res = $tmpbom->fetch($line->fk_bom_child);
+if (!empty($tmpbom->id)) {
+ print '' . (empty($conf->global->BOM_SHOW_ALL_BOM_BY_DEFAULT) ? '(+)' : '(-)') . ' ';
+}
print $tmpproduct->getNomUrl(1);
print ' - '.$tmpproduct->label;
print '';
+
+// To show BOM links in the list
+if ($res > 0) {
+ print '
'.$tmpbom->getNomUrl(1).'
';
+} else {
+ print '
';
+}
+
print '
';
$coldisplay++;
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
@@ -111,7 +124,8 @@ $coldisplay++;
echo $line->efficiency;
print '
';
+// Select of all the sub-BOM lines
+$sql = 'SELECT rowid, fk_bom_child, fk_product FROM '.MAIN_DB_PREFIX.'bom_bomline AS bl';
+$sql.= ' WHERE fk_bom ='. (int) $tmpbom->id;
+$resql = $object->db->query($sql);
+
+if ($resql) {
+ // Loop on all the sub-BOM lines if they exist
+ while ($obj = $object->db->fetch_object($resql)) {
+ $sub_bom_product = new Product($object->db);
+ $sub_bom_product->fetch($obj->fk_product);
+
+ $sub_bom = new BOM($object->db);
+ $sub_bom->fetch($obj->fk_bom_child);
+
+ $sub_bom_line = new BOMLine($object->db);
+ $sub_bom_line->fetch($obj->rowid);
+
+ //If hidden conf is set, we show directly all the sub-BOM lines
+ if (empty($conf->global->BOM_SHOW_ALL_BOM_BY_DEFAULT)) {
+ print '
';
+ }
+}
+
+// Replace of the total_cost value by the sum of all sub-BOM lines total_cost
+if ($total_cost > 0) {
+ $line->total_cost = price($total_cost);
+ ?>
+
+ showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"', 'colspan'=>$coldisplay), '', '', 1, 'line');
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index 10e81316ee4..3f1aac53340 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -104,4 +104,6 @@ HumanMachine=Human / Machine
WorkstationArea=Workstation area
Machines=Machines
THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item
+BOM=Bill Of Materials
+CollapseBOMHelp=You can define the default display of the details of the nomenclature in the configuration of the BOM module
MOAndLines=Manufacturing Orders and lines
diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang
index 4aaeb4f9366..5a89a594cc3 100644
--- a/htdocs/langs/fr_FR/mrp.lang
+++ b/htdocs/langs/fr_FR/mrp.lang
@@ -32,7 +32,7 @@ ValueOfMeansLossForProductProduced=Une valeur de 0,95 signifie une moyenne de 5%
DeleteBillOfMaterials=Supprimer la nomenclature
DeleteMo=Supprimer l'ordre de fabrication
ConfirmDeleteBillOfMaterials=Êtes-vous sûr de vouloir supprimer cette nomenclature?
-ConfirmDeleteMo=Are you sure you want to delete this Manufacturing Order?
+ConfirmDeleteMo=Êtes-vous sûr de vouloir supprimer cette nomenclature?
MenuMRP=Ordres de fabrication
NewMO=Nouvel Ordre de fabrication
QtyToProduce=Quantité à produire
@@ -74,7 +74,7 @@ NoStockChangeOnServices=Aucune variation de stock sur les services
ProductQtyToConsumeByMO=Quantité de produit restant à consommer par OF ouvert
ProductQtyToProduceByMO=Quantités restant à produire avec les OF ouverts
AddNewConsumeLines=Ajouter une nouvelle ligne à consommer
-AddNewProduceLines=Add new line to produce
+AddNewProduceLines=Ajouter une nouvelle ligne à produire
ProductsToConsume=Produits à consommer
ProductsToProduce=Produits à produire
UnitCost=Coût unitaire
@@ -105,3 +105,5 @@ WorkstationArea=Espace Poste de travail
Machines=Machines
THMEstimatedHelp=Ce taux permet de définir un coût prévisionnel de l'article
MOAndLines=Ordres de fabrication et lignes
+BOM=Nomenclature
+CollapseBOMHelp=Vous pouvez définir l'affichage par défaut du détail des nomenclature dans la configuration du module "Nomenclature Produits"