This commit is contained in:
Laurent Destailleur 2020-05-05 17:54:01 +02:00
parent b2a9791dca
commit e871e736eb
3 changed files with 3 additions and 3 deletions

View File

@ -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)
if ($permissiontodelete)
if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd))
{
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n";
}

View File

@ -1008,7 +1008,7 @@ class Mo extends CommonObject
}
$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')
{

View File

@ -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)
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";
}