From 2d29e0839e4e9880f0f7643190eeb8a9edc4d4d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Nov 2022 14:41:45 +0100 Subject: [PATCH 1/9] Prepare 16.0.3 --- ChangeLog | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ChangeLog b/ChangeLog index 321d6a29276..1abc487eff1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,33 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 16.0.3 compared to 16.0.2 ***** + +FIX: $sign is useless +FIX: #18304 Member subscription confirmation email sent even if mandatory fields are missing +FIX: #19828 +FIX: #19877 +FIX: #22509 default value on integer fields don't retrieve by setSaveQuery +FIX: #22786 +FIX: #22813 +FIX: #22824 Accountancy - Journal - Search on subledger when list of subledger is disabled +FIX: Backup using the low memory mode +FIX: Bankaccounts API fetch with 'id' and 'socid' +FIX: base64_decode should be forbiden in dol_eval +FIX: Broken Permissions check, $object is null. +FIX: compute next value when year is on one digit for reset counter +FIX: copy same behaviour in other accountancy files +FIX: Fix the position of the verification condition of the test field in case of multi entities +FIX: for #22882 +FIX: for #22952 +FIX: merge errors on mailing card +FIX: PaymentBankTransfer Type page management with Select and Input on create.php +FIX: remove not initialized variable +FIX: SQL request parenthesis +FIX: Use the Hook addMoreActionsButtons resPrint +FIX: Wrong Extrafields Element For Assets + ***** ChangeLog for 16.0.2 compared to 16.0.1 ***** FIX: 16.0 - computed extrafields are not displayed if the object has no other extrafields From f7676788db9a7f275e440177606561f6edbb8385 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Nov 2022 18:21:01 +0100 Subject: [PATCH 2/9] Work with gzip for debian package instead of xz --- build/debian/source/options | 6 +++--- build/makepack-dolibarr.pl | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/debian/source/options b/build/debian/source/options index 4918d029b84..8d8fd181896 100644 --- a/build/debian/source/options +++ b/build/debian/source/options @@ -1,3 +1,3 @@ -# Use bzip2 instead of gzip -compression = "bzip2" -compression-level = 9 +# Force use of gzip compression by dpkg-buildpackage +compression = "gzip" +#compression-level = 9 diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index b2381db6ba3..f65ba302be5 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -678,7 +678,7 @@ if ($nboftargetok) { mkdir($DESTI.'/standard'); if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; } } - + print "Remove target $FILENAMETGZ.tgz...\n"; unlink("$NEWDESTI/$FILENAMETGZ.tgz"); @@ -1064,7 +1064,8 @@ if ($nboftargetok) { $ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`; - $ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; + #$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option + $ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`; next; } From 35a30e0f8b6c548e0b75cb5e417951a3ee4b1224 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Nov 2022 18:31:43 +0100 Subject: [PATCH 3/9] Work with gzip for debian package instead of xz --- build/makepack-dolibarr.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index f65ba302be5..5d958787243 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -1147,7 +1147,8 @@ if ($nboftargetok) { "$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)', "$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF - "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF + #"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF + "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF "$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF "$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)', "$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM', From b713f645d4f4c7b5be884c8dd12f6e4ba9481267 Mon Sep 17 00:00:00 2001 From: antonin_tdj <50403308+ibuiv@users.noreply.github.com> Date: Tue, 29 Nov 2022 20:35:43 +0100 Subject: [PATCH 4/9] Update extrafields.class.php error message adapt error message for radio buttons --- htdocs/core/class/extrafields.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index a65a750a37b..79bea567406 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -10,6 +10,7 @@ * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2017 Nicolas ZABOURI * Copyright (C) 2018-2021 Frédéric France + * Copyright (C) 2022 Antonin MARCHAL * * 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 @@ -1709,7 +1710,11 @@ class ExtraFields dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); } } elseif ($type == 'radio') { - $value = $langs->trans($param['options'][$value]); + if(!isset($param['options'][$value])){ + $value = $langs->trans('ErrorNoValueForRadioType'); + } else { + $value = $langs->trans($param['options'][$value]); + } } elseif ($type == 'checkbox') { $value_arr = explode(',', $value); $value = ''; From 1394208de3529fd98fd130d4274c78435b23b9e9 Mon Sep 17 00:00:00 2001 From: antonin_tdj <50403308+ibuiv@users.noreply.github.com> Date: Tue, 29 Nov 2022 20:39:40 +0100 Subject: [PATCH 5/9] Update card.php add errors on langs errors added to langs object to improve error messages --- htdocs/commande/card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 586cf98d606..49f8c93922a 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) 2022 Antonin MARCHAL * * 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 @@ -60,7 +61,7 @@ if (!empty($conf->variants->enabled)) { } // Load translation files required by the page -$langs->loadLangs(array('orders', 'sendings', 'companies', 'bills', 'propal', 'deliveries', 'products', 'other')); +$langs->loadLangs(array('orders', 'sendings', 'companies', 'bills', 'propal', 'deliveries', 'products', 'other', 'errors')); if (!empty($conf->incoterm->enabled)) { $langs->load('incoterm'); } From 87526194c56bd5fd8ea025c4cb05d367134060b5 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 29 Nov 2022 19:44:44 +0000 Subject: [PATCH 6/9] Fixing style errors. --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 79bea567406..0096e0f8cd9 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1710,7 +1710,7 @@ class ExtraFields dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); } } elseif ($type == 'radio') { - if(!isset($param['options'][$value])){ + if (!isset($param['options'][$value])) { $value = $langs->trans('ErrorNoValueForRadioType'); } else { $value = $langs->trans($param['options'][$value]); From f1132ef8bab77779749ab51dc329bb61a389e9c7 Mon Sep 17 00:00:00 2001 From: antonin_tdj <50403308+ibuiv@users.noreply.github.com> Date: Wed, 30 Nov 2022 10:42:44 +0100 Subject: [PATCH 7/9] Revert add 'errors' on $langs->load Revert add 'errors' on $langs->load --- htdocs/commande/card.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 49f8c93922a..586cf98d606 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -14,7 +14,6 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2022 Gauthier VERDOL - * Copyright (C) 2022 Antonin MARCHAL * * 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 @@ -61,7 +60,7 @@ if (!empty($conf->variants->enabled)) { } // Load translation files required by the page -$langs->loadLangs(array('orders', 'sendings', 'companies', 'bills', 'propal', 'deliveries', 'products', 'other', 'errors')); +$langs->loadLangs(array('orders', 'sendings', 'companies', 'bills', 'propal', 'deliveries', 'products', 'other')); if (!empty($conf->incoterm->enabled)) { $langs->load('incoterm'); } From ef065967edafe7118c0a2149230412417097342a Mon Sep 17 00:00:00 2001 From: antonin_tdj <50403308+ibuiv@users.noreply.github.com> Date: Wed, 30 Nov 2022 10:44:10 +0100 Subject: [PATCH 8/9] Add $langs->load('errors') before radioError Add $langs->load('errors') before radioError --- htdocs/core/class/extrafields.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 0096e0f8cd9..1d5bd8dc7ef 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1711,6 +1711,7 @@ class ExtraFields } } elseif ($type == 'radio') { if (!isset($param['options'][$value])) { + $langs->load('errors'); $value = $langs->trans('ErrorNoValueForRadioType'); } else { $value = $langs->trans($param['options'][$value]); From f08870d91ef4fcd8f067323674d414c91d9907ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 30 Nov 2022 16:51:07 +0100 Subject: [PATCH 9/9] Fix label of some fields in dictionaries --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 3dec2565701..ed5e4c06b3d 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1965,7 +1965,7 @@ if ($id > 0) { $valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country); } } elseif ($value == 'recuperableonly' || $value == 'deductible' || $value == 'category_type') { - $valuetoshow = yn($valuetoshow); + $valuetoshow = yn($valuetoshow ? 1 : 0); $class = "center"; } elseif ($value == 'type_cdr') { if (empty($valuetoshow)) {