diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 97b2634d40d..e3167bb7109 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -108,3 +108,4 @@ 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 MoChildGenerate=Generate Child Mo +ParentMo=MO Parent diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index f3df78af869..0eb01e09cb5 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1205,7 +1205,7 @@ class Mo extends CommonObject /** * Create an array of lines - * @param string $rolefilter + * @param string $rolefilter string lines role filter * @return array|int array of lines if OK, <0 if KO */ public function getLinesArray($rolefilter = '') diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 2b6e7f5dbe4..a104a9a5d31 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -133,10 +133,9 @@ if (empty($reshook)) { } $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record - // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen - + //Create MO with Childs if ($action == 'add' && empty($id) && !empty($TBomLineId)) { - $noback = ""; + $noback = 0; include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; $mo_parent = $object; @@ -163,16 +162,13 @@ if (empty($reshook)) { $res = $object->add_object_linked('mo', $mo_parent->id); } - $noback = 0; - - header("Location: ".$urltogo); + header("Location: ".dol_buildpath('/mrp/mo_list.php', 1)); exit; } + // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; - - // Actions when linking object each other include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; @@ -531,7 +527,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $mo_parent = $object->getMoParent(); if (is_object($mo_parent)) { print ''; - print '' . $langs->trans('MOParent') . ''; + print '' . $langs->trans('ParentMo') . ''; print '' .$mo_parent->getNomUrl(1).''; print ''; }