From a725f30729cea0b714a757dcb2c555515e3701b1 Mon Sep 17 00:00:00 2001
From: John BOTELLA <68917336+thersane-john@users.noreply.github.com>
Date: Thu, 7 Nov 2024 08:52:20 +0100
Subject: [PATCH] Fix confusing behavior by add hidden conf
MAIN_LIST_ORDER_LINK_DONT_USE_STATUS
---
htdocs/commande/list.php | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 7f2e193eaf650..c1960a0c5e9f3 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -2212,7 +2212,15 @@
// Ref
if (!empty($arrayfields['c.ref']['checked'])) {
print '
';
- print $generic_commande->getNomUrl(1, ($search_status != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
+ $getNomUrlOption = $search_status != 2 ? 0 : $obj->fk_statut;
+ if (getDolGlobalInt('MAIN_LIST_ORDER_LINK_DONT_USE_STATUS')) {
+ // TODO : This hidden conf must be added to the user's individual conf.
+ // The user must be able to manage this behavior to adapt it to his use of the software, because depending on the employee's workstation, his use differs.
+ // This hidden configuration ensures that users are not confused by keeping the same behavior of click, whatever the current filter.
+ // If the aim is to use a different url when the filter is applied via the link in the left-hand menu, then this detection should be adapted instead.
+ $getNomUrlOption = '';
+ }
+ print $generic_commande->getNomUrl(1, $getNomUrlOption, 0, 0, 0, 1, 1);
$filename = dol_sanitizeFileName($obj->ref);
$filedir = $conf->commande->multidir_output[$conf->entity].'/'.dol_sanitizeFileName($obj->ref);
|