Skip to content

Commit

Permalink
Merge branch 'up5.0' into 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarcet committed May 31, 2017
2 parents f338682 + 5d115bc commit 1ec3491
Show file tree
Hide file tree
Showing 134 changed files with 1,592 additions and 946 deletions.
64 changes: 64 additions & 0 deletions ChangeLog
Expand Up @@ -2,6 +2,48 @@
English Dolibarr ChangeLog
--------------------------------------------------------------


***** ChangeLog for 5.0.2 compared to 5.0.1 *****
FIX: #6468 + Fix missing translation
FIX: #6517 #6525 Autocompletion of thirdparty after n chars not implemented
FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
FIX: #6614
FIX: #6619 Template invoices list do not respect restricted thirdparty user rights
FIX: #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
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: #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: #6718 Bug: Discount amount is not locally formatted in CommonObject View
FIX: #6767 serious critical error, no login possible with postgresql and ipv6.
FIX: #6795 #6796
FIX: Add option MAIN_MAIL_USE_MULTI_PART to include text content into HTML email and add option MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS to restore the inline images feature.
FIX: ajax autocomplete on clone
FIX: A non admin user can not download files attached to user.
FIX: Can't download delivery receipts (function dol_check_secure_access_document)
FIX: complete hourly rate when not defined into table of time spent
FIX: dont get empty "Incoterms : - " string if no incoterm
FIX: dont lose supplier ref if no supplier price in database
FIX: Enter a direct bank transaction
FIX: extrafield css for boolean type
FIX: forgotten parameter for right multicompany use
FIX: Found duplicate line when it is not.
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
FIX: Journal code of bank must be visible of accountaing module on.
FIX: length_accounta return variable name
FIX: limit+1 dosn't show Total line
FIX: No filter on company when showing the link to elements.
FIX: overwrapping of weight/volume on rouget template
FIX: Several bugs in accounting module.
FIX: shared bank account with multicompany not visible in invoice setup
FIX: spaces not allowed into vat code
FIX: supplier default condition not retrieved on create
FIX: supplier order line were always created with rang = 0

***** ChangeLog for 5.0.1 compared to 5.0.0 *****
FIX: #6503: SQL error in "Last pending payment invoices"
FIX: #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
Expand Down Expand Up @@ -176,6 +218,28 @@ Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful o
feedback to confirm all 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 *****
FIX: #6234
FIX: #6259
Expand Down
8 changes: 6 additions & 2 deletions build/makepack-dolibarr.pl
Expand Up @@ -19,7 +19,7 @@
# Change this to defined target for option 98 and 99
$PROJECT="dolibarr";
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
$PUBLISHBETARC="ldestailleur\@asso.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
$PUBLISHBETARC="ldestailleur\@vmprod.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";


#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
Expand Down Expand Up @@ -509,7 +509,6 @@
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;

# Removed known external modules to avoid any error when packaging from env where external modules are tested
#$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \;`; # For custom we want to keep dir
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
Expand All @@ -518,6 +517,7 @@
$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*`;
Expand Down Expand Up @@ -575,6 +575,10 @@
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;

print "Remove subdir of custom dir\n";
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to keep dir
}

# Build package for each target
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_fedora.spec
Expand Up @@ -173,6 +173,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/contrat
%_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/expedition
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_generic.spec
Expand Up @@ -253,6 +253,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/contrat
%_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/expedition
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_mandriva.spec
Expand Up @@ -170,6 +170,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/contrat
%_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/expedition
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_opensuse.spec
Expand Up @@ -181,6 +181,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/contrat
%_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/expedition
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 46 additions & 45 deletions dev/initdemo/mysqldump_dolibarr_5.0.0.sql

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dev/skeletons/build_class_from_table.php
Expand Up @@ -251,7 +251,7 @@
$i=0;
foreach($property as $key => $prop)
{
$i++;

$addfield=1;
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
if ($prop['extra'] == 'auto_increment') $addfield=0;
Expand All @@ -263,6 +263,7 @@
$varprop.="';";
$varprop.="\n";
}
$i++;
}
$targetcontent=preg_replace('/\$sql \.= \' field1,\';/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\$sql \.= \' field2\';/', '', $targetcontent);
Expand Down
2 changes: 1 addition & 1 deletion dev/skeletons/skeleton_list.php
Expand Up @@ -523,7 +523,7 @@ function init_myfunc()
$i++;
if ($i == 1)
{
if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
if ($num < $limit && empty($offset)) print '<td align="left">'.$langs->trans("Total").'</td>';
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
}
elseif ($totalarray['totalhtfield'] == $i) print '<td align="right">'.price($totalarray['totalht']).'</td>';
Expand Down
1 change: 1 addition & 0 deletions htdocs/.gitignore
Expand Up @@ -4,6 +4,7 @@
/dolimed*
/ecommerce*
/extensions*
/forceproject*
/google*
/lead
/multicompany*
Expand Down
15 changes: 12 additions & 3 deletions htdocs/accountancy/class/bookkeeping.class.php
Expand Up @@ -169,7 +169,15 @@ public function create(User $user, $notrigger = false) {
if (empty($this->numero_compte) || $this->numero_compte == '-1')
{
$langs->load("errors");
$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet);
if (in_array($this->doc_type, array('bank', 'expense_report')))
{
$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type);
}
else
{
$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForInvoiceLine', $this->fk_doc, $this->doc_type);
}

return -1;
}

Expand All @@ -178,11 +186,12 @@ public function create(User $user, $notrigger = false) {

$this->piece_num = 0;

// first check if line not yet in bookkeeping
// First check if line not yet already in bookkeeping
$sql = "SELECT count(*) as nb";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
$sql .= " WHERE doc_type = '" . $this->doc_type . "'";
$sql .= " AND fk_docdet = " . $this->fk_docdet;
$sql .= " AND fk_doc = " . $this->fk_doc;
$sql .= " AND fk_docdet = " . $this->fk_docdet; // This field can be 0 is record is for several lines
$sql .= " AND numero_compte = '" . $this->numero_compte . "'";
$sql .= " AND entity IN (" . getEntity("accountancy", 1) . ")";

Expand Down

0 comments on commit 1ec3491

Please sign in to comment.