diff --git a/ChangeLog b/ChangeLog
index 350a29fe051..68ce6daabcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -238,25 +238,38 @@ Following changes may create regressions for some external modules, but were nec
* Rename the substitution for project label instead of project title in substitution variables
-***** ChangeLog for 16.0.4 compared to 16.0.2 *****
+***** ChangeLog for 16.0.4 compared to 16.0.3 *****
FIX: Amount of localtax1 and 2 not correctly save on purchase order (the rate was saved instead)
FIX: #20415
FIX: #21280
FIX: #23008
FIX: #22271
+FIX: #22524
FIX: #22837
+FIX: #22964
+FIX: #23012
FIX: #23019 Impossible to add task times to an existing draft invoice
FIX: #23072
FIX: #23087
FIX: #23115
FIX: #23116
FIX: #23281
+FIX: #23420 : wrong check on $search_categ value causing FATAL ERROR
+FIX: Accountancy - Quadra export
+FIX: add border left on image product when conf activated
+FIX: Add missing token when deleting template inn order_supplier admin menu
+FIX: Amount of localtax1 and 2 not correctly save on purchase order (the
+FIX: API access for deactivated users
FIX: bad selection of barcode numbering module
FIX: Can't see all time spent by all user
FIX: CI
FIX: CommonObject - showOptionals - Display blank td when MAIN_VIEW_LINE_NUMBER is enabled and action is confirm_valid
FIX: Documents API inconsistency
+FIX: Empty FormSetup emailTemplate type IF empty fieldvalue
+FIX: Errors Handling for CreateFrom Hooks
+FIX: error with dol_banner_tab, ref is needed
+FIX: ExpenseReport card was not reloaded after addline
FIX: #23075
FIX: #23117
FIX: get multicurrency infos of propal when create order from propal with "WORKFLOW_PROPAL_AUTOCREATE_ORDER" conf
@@ -264,12 +277,16 @@ FIX: Give predictable order to inventory lines
FIX: include class multicurrency
FIX: methods declaration (backport fix 67b9a7dc07d708231d12b5e58800334d4a01ef98)
FIX: multicurrency_tx and not currency_tx
-FIX: PGSQL Integer type does not have a free length
+FIX: on public ticket list, only the page 1 was accessible. Other pages were 404 error.
+FIX: PGSQL Integer type does not have a free lenght
+FIX: PGSQL Int type does not have a free lenght
FIX: Product list in setup.php in new Module
FIX: propal and order stats broken on Tag+User(retricted customer list)
FIX: saving of numbering module for jobs
FIX: Stickler
FIX: travis
+FIX: wrong check on $search_categ value causing fatal error
+FIX: wrong stock list with multicompany and without stock sharing
***** ChangeLog for 16.0.3 compared to 16.0.2 *****
diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php
index d8fb57b49f5..47066900c04 100644
--- a/htdocs/admin/website.php
+++ b/htdocs/admin/website.php
@@ -43,10 +43,6 @@ $rowid = GETPOST('rowid', 'alpha');
$id = 1;
-if (!$user->admin) {
- accessforbidden();
-}
-
$acts[0] = "activate";
$acts[1] = "disable";
$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"');
@@ -125,6 +121,10 @@ $tabfieldcheck[1] = array();
$elementList = array();
$sourceList = array();
+if (!$user->admin) {
+ accessforbidden();
+}
+
/*
* Actions
@@ -596,7 +596,9 @@ if ($id) {
print '
';
print '';
- print '
';
+ print ' ';
+ print '';
+ print '';
} else {
$tmpaction = 'view';
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php
index 340efbf30a8..1eba5ec7de9 100644
--- a/htdocs/comm/action/peruser.php
+++ b/htdocs/comm/action/peruser.php
@@ -924,6 +924,10 @@ while ($currentdaytoshow < $lastdaytoshow) {
if ($usergroup > 0) {
$sql .= " AND ug.fk_usergroup = ".((int) $usergroup);
}
+ if ($user->socid > 0) {
+ // External users should see only contacts of their company
+ $sql .= " AND u.fk_soc = ".((int) $user->socid);
+ }
//print $sql;
$resql = $db->query($sql);
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index b748cac3df4..5d71683a311 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -61,25 +61,17 @@ if (isset($user->socid) && $user->socid > 0) {
$socid = $user->socid;
}
+
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$maxofloop = (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
$now = dol_now();
-// Security check
-//$socid = GETPOST("socid", 'int');
-if ($user->socid > 0) {
- $action = '';
- $id = $user->socid;
-} else {
- $id = 0;
-}
-
-//restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
+//restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0);
if (!$user->hasRight('propal', 'read') && !$user->hasRight('supplier_proposal', 'read') && !$user->hasRight('commande', 'read') && !$user->hasRight('fournisseur', 'commande', 'read')
&& !$user->hasRight('supplier_order', 'read') && !$user->hasRight('fichinter', 'read')) {
accessforbidden();
}
-$maxofloop = (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
/*
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 09b3c14a1da..3a34594bbd8 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -14,6 +14,7 @@
* Copyright (C) 2015 Jean-François Ferry
* Copyright (C) 2018-2021 Frédéric France
* Copyright (C) 2022 Gauthier VERDOL
+ * Copyright (C) 2023 Benjamin Falière
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1841,25 +1842,25 @@ if ($action == 'create' && $usercancreate) {
// Delivery delay
print '
';
// TODO How record was recorded OrderMode (llx_c_input_method)
@@ -1893,7 +1894,7 @@ if ($action == 'create' && $usercancreate) {
$langs->load("projects");
print '