From 685119cdde161934de4f74aa0f02ebf17d7a3ad7 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 7 Oct 2025 16:02:54 +0200 Subject: [PATCH 1/2] Fix option MAIN_SHOW_TECHNICAL_ID borken on projects --- htdocs/projet/list.php | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index c1aca4eb473..44e90912960 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -106,6 +106,7 @@ $pagenext = $page + 1; $search_all = GETPOST('search_all', 'alphanohtml'); $search_entity = GETPOSTINT('search_entity'); +$search_id = GETPOST("search_id", 'alpha'); $search_ref = GETPOST("search_ref", 'alpha'); $search_label = GETPOST("search_label", 'alpha'); $search_societe = GETPOST("search_societe", 'alpha'); @@ -392,6 +393,7 @@ if (empty($reshook)) { // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers $search_all = ''; + $search_id = ""; $search_ref = ""; $search_label = ""; $search_societe = ""; @@ -629,6 +631,9 @@ if (!$user->hasRight('projet', 'all', 'lire')) { if ($socid > 0) { $sql .= " AND (p.fk_soc = ".((int) $socid).")"; // This filter if when we use a hard coded filter on company on url (not related to filter for external users) } +if ($search_id) { + $sql .= natural_search('p.rowid', $search_id, 1); +} if ($search_ref) { $sql .= natural_search('p.ref', $search_ref); } @@ -1054,6 +1059,9 @@ if (!empty($search_category_array)) { $param .= '&search_categegory_project_list[]='.urlencode($tmpval); } } +if ($search_id != '') { + $param .= '&search_id='.urlencode($search_id); +} if ($search_ref != '') { $param .= '&search_ref='.urlencode($search_ref); } @@ -1300,10 +1308,16 @@ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print $searchpicto; print ''; } +// Project ID +if (!empty($arrayfields['p.rowid']['checked'])) { + print ''; + print ''; + print ''; +} // Project ref if (!empty($arrayfields['p.ref']['checked'])) { print ''; - print ''; + print ''; print ''; } // Project label @@ -1514,6 +1528,10 @@ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; $totalarray['nbfield']++; } +if (!empty($arrayfields['p.rowid']['checked'])) { + print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder); + $totalarray['nbfield']++; +} if (!empty($arrayfields['p.ref']['checked'])) { print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; @@ -1917,7 +1935,16 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } - // Project url + // Project ID + if (!empty($arrayfields['p.rowid']['checked'])) { + print ''; + print $object->id; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Project ref url if (!empty($arrayfields['p.ref']['checked'])) { print ''; print $object->getNomUrl(1, (!empty(GETPOSTINT('search_usage_event_organization')) ? 'eventorganization' : '')); From 6c738b6503f9c6758c90fe6e65ccc7f33a6df88f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 7 Oct 2025 18:58:38 +0200 Subject: [PATCH 2/2] fix CI v22 (#35667) --- htdocs/product/stock/class/mouvementstock.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 821ea3b780f..2653a8b5547 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -1353,6 +1353,8 @@ class MouvementStock extends CommonObject $newtype = 3; } elseif ($this->type == 3) { $newtype = 2; + } else { + return -1; } $newqty = - $this->qty;