Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/langs/en_US/main.lang
This commit is contained in:
commit
c9a09adf79
24
ChangeLog
24
ChangeLog
@ -234,7 +234,29 @@ Dolibarr better:
|
||||
- Method commande->set_availability(user, availability_id) removed from commande class, use method commande->availability(availability_id, notrigger).
|
||||
|
||||
Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful on PHP 7.1 but we don't have enough
|
||||
feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
|
||||
feedback to confirm whole application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
|
||||
|
||||
|
||||
***** ChangeLog for 4.0.6 to 4.0.5 *****
|
||||
FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
|
||||
FIX: #6623 User card shows "Return to list" link even if the user has no rights to list users
|
||||
FIX: #6636 Complete fix
|
||||
FIX: #6669 User with no permission to edit customer invoices can see a edit button in project entry
|
||||
FIX: #6671 Cannot remove thirdparty type with "#" in its name
|
||||
FIX: #6673 Missing "nature" table header in thirdparty list
|
||||
FIX: #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
|
||||
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
|
||||
FIX: #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
|
||||
FIX: #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
|
||||
FIX: #6813
|
||||
FIX: Correction with author and validator user on orders
|
||||
FIX: doactions hook missing in invoice model page
|
||||
FIX: dont get empty "Incoterms : - " string if no incoterm
|
||||
FIX: dont lose supplier ref if no supplier price in database
|
||||
FIX: forgotten parameter for right multicompany use
|
||||
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
|
||||
FIX: limit+1 dosn't show Total line
|
||||
FIX: supplier order line were always created with rang = 0
|
||||
|
||||
|
||||
***** ChangeLog for 4.0.5 to 4.0.4 *****
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use Cwd;
|
||||
|
||||
use Term::ANSIColor;
|
||||
|
||||
# Change this to defined target for option 98 and 99
|
||||
$PROJECT="dolibarr";
|
||||
@ -313,20 +313,6 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
|
||||
print "\n";
|
||||
|
||||
# Build xml check file
|
||||
#-----------------------
|
||||
if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||
{
|
||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||
print $ret."\n";
|
||||
# Copy to final dir
|
||||
$NEWDESTI=$DESTI;
|
||||
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
|
||||
use File::Copy qw(copy);
|
||||
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
|
||||
}
|
||||
|
||||
|
||||
#print join(',',sort keys %CHOOSEDTARGET)."\n";
|
||||
|
||||
@ -335,7 +321,10 @@ if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||
$nboftargetok=0;
|
||||
$nboftargetneedbuildroot=0;
|
||||
$nbofpublishneedtag=0;
|
||||
$nbofpublishneedchangelog=0;
|
||||
|
||||
foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
if ($target eq '-CHKSUM') { $nbofpublishneedchangelog++; }
|
||||
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
||||
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
|
||||
{
|
||||
@ -345,34 +334,31 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
}
|
||||
foreach my $target (sort keys %CHOOSEDPUBLISH) {
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
if ($target eq 'ASSO') { $nbofpublishneedtag++; }
|
||||
if ($target eq 'SF') { $nbofpublishneedtag++; }
|
||||
if ($target eq 'ASSO') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
|
||||
if ($target eq 'SF') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
|
||||
$nboftargetok++;
|
||||
}
|
||||
|
||||
|
||||
if ($nboftargetok) {
|
||||
|
||||
# Update GIT tag if required
|
||||
#---------------------------
|
||||
if ($nbofpublishneedtag)
|
||||
# Check Changelog
|
||||
#----------------
|
||||
if ($nbofpublishneedchangelog)
|
||||
{
|
||||
print "Go to directory $SOURCE\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
# Test that the ChangeLog is ok
|
||||
$TMPBUILDTOCHECKCHANGELOG=$BUILD;
|
||||
$TMPBUILDTOCHECKCHANGELOG =~ s/\-rc\d*//;
|
||||
$TMPBUILDTOCHECKCHANGELOG =~ s/\-beta\d*//;
|
||||
print "Check if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n";
|
||||
print "\nCheck if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n";
|
||||
$ret=`grep "ChangeLog for $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG" "$SOURCE/ChangeLog" 2>&1`;
|
||||
if (! $ret)
|
||||
{
|
||||
print "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n";
|
||||
print color("yellow"), "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n", color('reset');
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with commande:'\n";
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n";
|
||||
}
|
||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||
{
|
||||
@ -385,9 +371,39 @@ if ($nboftargetok) {
|
||||
print "\n";
|
||||
if (! $ret)
|
||||
{
|
||||
exit;
|
||||
print "\nPress F to force and continue anyway (or other key to stop)... ";
|
||||
my $WAITKEY=<STDIN>;
|
||||
chomp($WAITKEY);
|
||||
if ($WAITKEY ne 'F')
|
||||
{
|
||||
print "Canceled.\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Build xml check file
|
||||
#-----------------------
|
||||
if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||
{
|
||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||
print $ret."\n";
|
||||
# Copy to final dir
|
||||
$NEWDESTI=$DESTI;
|
||||
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
|
||||
use File::Copy qw(copy);
|
||||
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
|
||||
}
|
||||
|
||||
# Update GIT tag if required
|
||||
#---------------------------
|
||||
if ($nbofpublishneedtag)
|
||||
{
|
||||
print "Go to directory $SOURCE\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
|
||||
if ($ret =~ /(already exists|existe déjà)/)
|
||||
@ -517,6 +533,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
|
||||
@ -570,14 +570,43 @@ if ($action == 'confirm_refuse')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Si Validation de la demande
|
||||
if ($action == 'confirm_draft' && GETPOST('confirm') == 'yes')
|
||||
{
|
||||
$object = new Holiday($db);
|
||||
$object->fetch($id);
|
||||
|
||||
$oldstatus = $object->statut;
|
||||
$object->statut = 1;
|
||||
|
||||
$result = $object->update($user);
|
||||
if ($result < 0)
|
||||
{
|
||||
$error = $langs->trans('ErrorBackToDraft');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
// Si Validation de la demande
|
||||
if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes')
|
||||
{
|
||||
$object = new Holiday($db);
|
||||
$object->fetch($id);
|
||||
|
||||
// Si statut en attente de validation et valideur = utilisateur
|
||||
if (($object->statut == 2 || $object->statut == 3) && ($user->id == $object->fk_validator || $user->id == $object->fk_user))
|
||||
// Si statut en attente de validation et valideur = valideur ou utilisateur, ou droits de faire pour les autres
|
||||
if (($object->statut == 2 || $object->statut == 3) && ($user->id == $object->fk_validator || $user->id == $object->fk_user || ! empty($user->rights->holiday->write_all)))
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
@ -995,6 +1024,12 @@ else
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1);
|
||||
}
|
||||
|
||||
// Si back to draft
|
||||
if ($action == 'backtodraft')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("TitleSetToDraft"),$langs->trans("ConfirmSetToDraft"),"confirm_draft", '', 1, 1);
|
||||
}
|
||||
|
||||
$head=holiday_prepare_head($object);
|
||||
|
||||
|
||||
@ -1214,18 +1249,31 @@ else
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete" class="butActionDelete">'.$langs->trans("DeleteCP").'</a>';
|
||||
}
|
||||
|
||||
if ($user->id == $object->fk_validator && $object->statut == 2)
|
||||
if ($object->statut == 2)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid" class="butAction">'.$langs->trans("Approve").'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=refuse" class="butAction">'.$langs->trans("ActionRefuseCP").'</a>';
|
||||
if ($user->id == $object->fk_validator)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid" class="butAction">'.$langs->trans("Approve").'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=refuse" class="butAction">'.$langs->trans("ActionRefuseCP").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="#" class="butActionRefused" title="'.$langs->trans("NotTheAssignedApprover").'">'.$langs->trans("Approve").'</a>';
|
||||
print '<a href="#" class="butActionRefused" title="'.$langs->trans("NotTheAssignedApprover").'">'.$langs->trans("ActionRefuseCP").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (($user->id == $object->fk_validator || $user->id == $object->fk_user) && ($object->statut == 2 || $object->statut == 3)) // Status validated or approved
|
||||
if (($user->id == $object->fk_validator || $user->id == $object->fk_user || ! empty($user->rights->holiday->write_all)) && ($object->statut == 2 || $object->statut == 3)) // Status validated or approved
|
||||
{
|
||||
if (($object->date_debut > dol_now()) || $user->admin) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel" class="butAction">'.$langs->trans("ActionCancelCP").'</a>';
|
||||
else print '<a href="#" class="butActionRefused" title="'.$langs->trans("HolidayStarted").'">'.$langs->trans("ActionCancelCP").'</a>';
|
||||
}
|
||||
|
||||
if ($canedit && $object->statut == 4)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=backtodraft" class="butAction">'.$langs->trans("SetToDraft").'</a>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
@ -46,6 +46,7 @@ ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_product (fk
|
||||
|
||||
ALTER TABLE llx_facture_rec ADD COLUMN fk_user_modif integer;
|
||||
ALTER TABLE llx_expedition ADD COLUMN fk_user_modif integer;
|
||||
ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer;
|
||||
|
||||
ALTER TABLE llx_adherent ADD COLUMN model_pdf varchar(255);
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ CancelCP=Canceled
|
||||
RefuseCP=Refused
|
||||
ValidatorCP=Approbator
|
||||
ListeCP=List of leaves
|
||||
ReviewedByCP=Will be reviewed by
|
||||
ReviewedByCP=Will be approved by
|
||||
DescCP=Description
|
||||
SendRequestCP=Create leave request
|
||||
DelayToRequestCP=Leave requests must be made at least <b>%s day(s)</b> before them.
|
||||
|
||||
@ -775,6 +775,8 @@ ClickToShowHelp=Click to show tooltip help
|
||||
HR=HR
|
||||
HRAndBank=HR and Bank
|
||||
AutomaticallyCalculated=Automatically calculated
|
||||
TitleSetToDraft=Go back to draft
|
||||
ConfirmSetToDraft=Are you sure you want to go back to Draft status ?
|
||||
# Week day
|
||||
Monday=Monday
|
||||
Tuesday=Tuesday
|
||||
|
||||
Loading…
Reference in New Issue
Block a user