diff --git a/htdocs/bom/bom_net_needs.php b/htdocs/bom/bom_net_needs.php
index f6644590a2e..f320798bf93 100644
--- a/htdocs/bom/bom_net_needs.php
+++ b/htdocs/bom/bom_net_needs.php
@@ -214,6 +214,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").' ';
}
print '';
+ if($action == 'treeview') print '
'.$langs->trans('ProducedBy').' | ';
print ''.$langs->trans('Quantity').' | ';
print ''.$form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1).' | ';
print ''.$form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")).' | ';
@@ -226,13 +227,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
foreach ($TChildBom as $fk_bom => $TProduct) {
$repeatChar = ' ';
if (!empty($TProduct['bom'])) {
+ $prod = new Product($db);
+ $prod->fetch($TProduct['bom']->fk_product);
if ($TProduct['parentid'] != $object->id) print '';
else print '
';
- print '| '.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1);
+ if($action == 'treeview') print ' | '.str_repeat($repeatChar, $TProduct['level']).$prod->getNomUrl(1);
+ else print ' | '.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1);
print ' ';
print img_picto('', 'folder-open');
print '';
print ' | ';
+ if($action == 'treeview') print ''.$TProduct['bom']->getNomUrl(1).' | ';
print ''.$TProduct['qty'].' | ';
print ' | ';
print ' | ';
@@ -247,6 +252,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($fk_bom != $object->id) print '
';
else print '
';
print '| '.str_repeat($repeatChar, $TInfos['level']).$prod->getNomUrl(1).' | ';
+ if($action == 'treeview') print ' | ';
print ''.$TInfos['qty'].' | ';
print ''.price2num($prod->stock_reel, 'MS').' | ';
print ''.$prod->stock_theorique.' | ';
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index 6bdea0cc951..fffb9e571da 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -118,3 +118,4 @@ BomCantAddChildBom=The nomenclature %s is already present in the tree leading to
BOMNetNeeds = BOM Net Needs
BOMProductsList=BOM's products
BOMServicesList=BOM's services
+ProducedBy=Produced by
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang
index 26942e14743..ff105886987 100644
--- a/htdocs/langs/fr_FR/mrp.lang
+++ b/htdocs/langs/fr_FR/mrp.lang
@@ -119,3 +119,4 @@ BomCantAddChildBom=La nomenclature %s est déjà présente dans l'arbre menant
BOMNetNeeds = Besoins nets
BOMProductsList=Les produits de BOM
BOMServicesList=Les services de BOM
+ProducedBy=Produit par
\ No newline at end of file