Fix for #5824
This commit is contained in:
parent
b2a9791dca
commit
e871e736eb
@ -533,7 +533,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Delete (need delete permission, or if draft, just need create/modify permission)
|
// Delete (need delete permission, or if draft, just need create/modify permission)
|
||||||
if ($permissiontodelete)
|
if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd))
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>'."\n";
|
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1008,7 +1008,7 @@ class Mo extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id;
|
$url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id;
|
||||||
if ($option = 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id;
|
if ($option == 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id;
|
||||||
|
|
||||||
if ($option != 'nolink')
|
if ($option != 'nolink')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -639,7 +639,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete (need delete permission, or if draft, just need create/modify permission)
|
// Delete (need delete permission, or if draft, just need create/modify permission)
|
||||||
if ($permissiontodelete)
|
if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd))
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>'."\n";
|
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user