Skip to content

Commit 69a2234

Browse files
authored
NEW Dashboard - Add option in ihm to disable MRP thumb (#36185)
1 parent c39e87d commit 69a2234

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

htdocs/admin/ihm.php

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
2-
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <[email protected]>
3-
* Copyright (C) 2004-2015 Laurent Destailleur <[email protected]>
4-
* Copyright (C) 2005-2017 Regis Houssin <[email protected]>
5-
* Copyright (C) 2016 Juanjo Menent <[email protected]>
6-
* Copyright (C) 2018 Ferran Marcet <[email protected]>
7-
* Copyright (C) 2021 Alexandre Spangaro <[email protected]>
8-
* Copyright (C) 2021-2023 Anthony Berton <[email protected]>
9-
* Copyright (C) 2023 Eric Seigne <[email protected]>
2+
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <[email protected]>
3+
* Copyright (C) 2004-2015 Laurent Destailleur <[email protected]>
4+
* Copyright (C) 2005-2017 Regis Houssin <[email protected]>
5+
* Copyright (C) 2016 Juanjo Menent <[email protected]>
6+
* Copyright (C) 2018 Ferran Marcet <[email protected]>
7+
* Copyright (C) 2021-2025 Alexandre Spangaro <[email protected]>
8+
* Copyright (C) 2021-2023 Anthony Berton <[email protected]>
9+
* Copyright (C) 2023 Eric Seigne <[email protected]>
1010
* Copyright (C) 2024 MDW <[email protected]>
11-
* Copyright (C) 2024-2025 Frédéric France <[email protected]>
11+
* Copyright (C) 2024-2025 Frédéric France <[email protected]>
1212
*
1313
* This program is free software; you can redistribute it and/or modify
1414
* it under the terms of the GNU General Public License as published by
@@ -658,6 +658,12 @@
658658
print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard');
659659
print '</td>';
660660
print '</tr>';
661+
662+
// Block mrp
663+
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockMrp') . '</td><td>';
664+
print ajax_constantonoff("MAIN_DISABLE_BLOCK_MRP", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard');
665+
print '</td>';
666+
print '</tr>';
661667
}
662668

663669
print '</table>' . "\n";

htdocs/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (C) 2015 Marcos García <[email protected]>
77
* Copyright (C) 2021-2025 Frédéric France <[email protected]>
88
* Copyright (C) 2024-2025 MDW <[email protected]>
9-
* Copyright (C) 2024 Alexandre Spangaro <[email protected]>
9+
* Copyright (C) 2024-2025 Alexandre Spangaro <[email protected]>
1010
*
1111
* This program is free software; you can redistribute it and/or modify
1212
* it under the terms of the GNU General Public License as published by
@@ -337,7 +337,7 @@
337337
$dashboardlines[$board->element] = $board->load_board($user);
338338
}
339339

340-
if (isModEnabled('mrp')) {
340+
if (isModEnabled('mrp') && !getDolGlobalString('MAIN_DISABLE_BLOCK_MRP')) {
341341
include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
342342
$board = new Mo($db);
343343
$dashboardlines[$board->element] = $board->load_board($user);

htdocs/langs/en_US/admin.lang

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2423,6 +2423,7 @@ DashboardDisableBlockBank=Disable the thumb for banks
24232423
DashboardDisableBlockAdherent=Disable the thumb for memberships
24242424
DashboardDisableBlockExpenseReport=Disable the thumb for expense reports
24252425
DashboardDisableBlockHoliday=Disable the thumb for leaves
2426+
DashboardDisableBlockMrp=Disable the thumb for MRP
24262427
EnabledCondition=Condition to have field enabled
24272428
EnabledConditionHelp=if not enabled, visibility will always be off
24282429
IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sales tax

0 commit comments

Comments
 (0)