diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index 442c5c92b1c..6bdea0cc951 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -11,8 +11,8 @@ Bom=Bills of Material
BillOfMaterials=Bill of Materials
BillOfMaterialsLines=Bill of Materials lines
BOMsSetup=Setup of module BOM
-ListOfBOMs=List of bills of material - BOM
-ListOfManufacturingOrders=List of Manufacturing Orders
+ListOfBOMs=Bills of material - BOM
+ListOfManufacturingOrders=Manufacturing Orders
NewBOM=New bill of materials
ProductBOMHelp=Product to create (or disassemble) with this BOM.
Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list.
BOMsNumberingModules=BOM numbering templates
@@ -116,3 +116,5 @@ ParentMo=MO Parent
MOChild=MO Child
BomCantAddChildBom=The nomenclature %s is already present in the tree leading to the nomenclature %s
BOMNetNeeds = BOM Net Needs
+BOMProductsList=BOM's products
+BOMServicesList=BOM's services
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index 4e80c81a4df..a91e93e6b51 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -321,9 +321,8 @@ if (($id || $ref) && $action == 'edit') {
// Part to show record
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
- $res = $object->fetch_optionals();
-
$head = myobjectPrepareHead($object);
+
print dol_get_fiche_head($head, 'card', $langs->trans("MyObject"), -1, $object->picto);
$formconfirm = '';
@@ -389,39 +388,36 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$morehtmlref = '
';
/*
- // Ref customer
- $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
- $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
- // Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
- // Project
- if (!empty($conf->project->enabled)) {
- $langs->load("projects");
- $morehtmlref .= '
'.$langs->trans('Project') . ' ';
- if ($permissiontoadd) {
- //if ($action != 'classify') $morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
- $morehtmlref .= ' : ';
- if ($action == 'classify') {
- //$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $morehtmlref .= '
';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
- }
- } else {
- if (!empty($object->fk_project)) {
- $proj = new Project($db);
- $proj->fetch($object->fk_project);
- $morehtmlref .= ': '.$proj->getNomUrl();
- } else {
- $morehtmlref .= '';
- }
- }
- }*/
+ // Ref customer
+ $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
+ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.$conf->global->THIRDPARTY_REF_INPUT_SIZE : ''), '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1, 'customer');
+ if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
+ $morehtmlref .= ' (
'.$langs->trans("OtherOrders").')';
+ }
+ // Project
+ if (isModEnabled('project')) {
+ $langs->load("projects");
+ $morehtmlref .= '
';
+ if ($permissiontoadd) {
+ $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
+ if ($action != 'classify') {
+ $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
+ }
+ $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, '');
+ } else {
+ if (!empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref .= $proj->getNomUrl(1);
+ if ($proj->title) {
+ $morehtmlref .= '
- '.dol_escape_htmltag($proj->title).'';
+ }
+ }
+ }
+ }
+ */
$morehtmlref .= '
';
diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php
index ac944acc066..dbba6ed912a 100644
--- a/htdocs/mrp/mo_agenda.php
+++ b/htdocs/mrp/mo_agenda.php
@@ -151,33 +151,28 @@ if ($object->id > 0) {
//$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
//$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
+ $morehtmlref .= $object->thirdparty->getNomUrl(1, 'customer');
+ if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
+ $morehtmlref .= ' (