FIX: Fix delete consumed line of a Mo with movement stock (#25343)
* FIX: Fix delete consumed line of a Mo with movement stock * Fix langs
This commit is contained in:
parent
4f4f817690
commit
765dd665f8
2 changed files with 2 additions and 2 deletions
|
|
@ -842,7 +842,7 @@ class Mo extends CommonObject
|
|||
public function deleteLine(User $user, $idline, $notrigger = false)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load('stocks');
|
||||
$langs->loadLangs(array('stocks', 'mrp'));
|
||||
|
||||
if ($this->status < 0) {
|
||||
$this->error = 'ErrorDeleteLineNotAllowedByObjectStatus';
|
||||
|
|
|
|||
|
|
@ -1045,7 +1045,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
|
||||
// Action delete line
|
||||
if ($permissiontodelete) {
|
||||
$href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=deleteline&token='.newToken().'&lineid='.((int) $line2['rowid']).'&fk_movement='.((int) $line2['fk_stock_movement']);
|
||||
$href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=deleteline&token='.newToken().'&lineid='.((int) $line->id).'&fk_movement='.((int) $line2['fk_stock_movement']);
|
||||
print '<td class="center">';
|
||||
print '<a class="reposition" href="'.$href.'">';
|
||||
print img_picto($langs->trans('TooltipDeleteAndRevertStockMovement'), 'delete');
|
||||
|
|
|
|||
Loading…
Reference in a new issue