Fix #16525 : new button manufacturing order

This commit is contained in:
lmarcouiller 2021-03-04 15:02:46 +01:00
parent 43e58f70a1
commit 33f7f2c7d2
2 changed files with 16 additions and 2 deletions

View File

@ -168,7 +168,7 @@ class Mo extends CommonObject
/**
* @var string Name of subtable line
*/
public $table_element_line = 'mo_production';
public $table_element_line = 'mrp_production';
/**
* @var string Field with ID of parent key if this field has a parent

View File

@ -48,7 +48,7 @@ $confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mocard'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha');
//$lineid = GETPOST('lineid', 'int');
$lineid = GETPOST('lineid', 'int');
$collapse = GETPOST('collapse', 'aZ09comma');
@ -724,6 +724,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print '</td>';
}
if ($permissiontodelete) {
print '<td/>';
}
print '</tr>';
if ($action == 'addconsumeline') {
@ -849,6 +852,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($conf->productbatch->enabled) {
print '<td></td>'; // Lot
}
if ($permissiontodelete) {
$href = $_SERVER["PHP_SELF"];
$href .= '?id='.$object->id;
$href .= '&action=deleteline';
$href .= '&lineid='.$line->id;
print '<td class="center">';
print '<a href="'.$href.'">';
print img_picto('', "delete");
print '</a>';
print '</td>';
}
print '</tr>';
// Show detailed of already consumed with js code to collapse