Skip to content

Commit

Permalink
Merge branch '8.0' of https://github.com/Dolibarr/dolibarr into 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
grandoc committed Sep 6, 2018
2 parents 8443336 + b25a0ca commit 9025fd5
Show file tree
Hide file tree
Showing 275 changed files with 9,334 additions and 8,603 deletions.
14 changes: 9 additions & 5 deletions .travis.yml
Expand Up @@ -2,7 +2,7 @@
# from Dolibarr GitHub repository.
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/

# We use dist: precise to have php 5.3 available
# We use dist: trusty to have php 5.4+ available
dist: trusty
sudo: required

Expand Down Expand Up @@ -37,7 +37,6 @@ php:
- '7.0'
- '7.1'
- '7.2'
#- hhvm only with dist: trusty
- nightly

env:
Expand All @@ -59,10 +58,17 @@ env:
matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: nightly
# We exclude some combinations not usefull to save Travis CPU
exclude:
- php: '5.5'
env: DB=mariadb
- php: '5.6'
env: DB=mariadb
- php: '7.0'
env: DB=mariadb
- php: '7.1'
env: DB=mariadb
- php: '5.5'
env: DB=postgresql
- php: '5.6'
Expand All @@ -71,8 +77,6 @@ matrix:
env: DB=postgresql
- php: '7.1'
env: DB=postgresql
- php: hhvm
env: DB=postgresql
- php: nightly
env: DB=postgresql

Expand Down
6 changes: 6 additions & 0 deletions .tx/config
Expand Up @@ -38,6 +38,12 @@ source_file = htdocs/langs/en_US/bills.lang
source_lang = en_US
type = MOZILLAPROPERTIES

[dolibarr.blockedlog]
file_filter = htdocs/langs/<lang>/blockedlog.lang
source_file = htdocs/langs/en_US/blockedlog.lang
source_lang = en_US
type = MOZILLAPROPERTIES

[dolibarr.bookmarks]
file_filter = htdocs/langs/<lang>/bookmarks.lang
source_file = htdocs/langs/en_US/bookmarks.lang
Expand Down
32 changes: 32 additions & 0 deletions ChangeLog
Expand Up @@ -2,6 +2,38 @@
English Dolibarr ChangeLog
--------------------------------------------------------------

***** ChangeLog for 8.0.1 compared to 8.0.0 *****
FIX: #9258
FIX: #9328
FIX: #9337
FIX: adding GROUP BY for PostgreSQL
FIX: API template for list pages in module builder
FIX: API template for record page to delete a record
FIX: a removed option was still in setup
FIX: badge on time spent on project and tasks
FIX: Delete file on smartphone
FIX: Fetch function will fetch comments
FIX: Fetch task will now fetch comments
FIX: $fk_account is always empty, must be $soc->fk_account
FIX: Force stripe api version to avoid trouble if we update stripe api
FIX: get_product_vat_for_country functions.lib.php
FIX: Get templates in a forced language
FIX: hook on dispatch order fourn
FIX: Language selection lost if error during creation of email template
FIX: Look and feel v8
FIX: propal.class.php
FIX: Add calls to fetchComments function
FIX: Remove fetchComments from project and task fetch function
FIX: remove internal property isextrafieldmanaged from API returns
FIX: sql error
FIX: table llx_chargessociales doesn't exists
FIX: trans on null object
FIX: vat rate code not returned by get_product_vat_for_country
FIX: warning for late template invoices to remove when suspended
FIX: Add hidden option MAIN_xxx_IN_SOURCE_ADDRESS to solve legal issues on PDF
FIX: Table llx_facture_rec_extrafields missing after migration


***** ChangeLog for 8.0.0 compared to 7.0.0 *****

For Users:
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# DOLIBARR ERP & CRM

![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg) ![Downloads per day](https://img.shields.io/sourceforge/dm/dolibarr.svg)
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/8.0.svg) ![Downloads per day](https://img.shields.io/sourceforge/dm/dolibarr.svg)

Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).

Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_fedora.spec
Expand Up @@ -212,6 +212,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_generic.spec
Expand Up @@ -292,6 +292,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_mandriva.spec
Expand Up @@ -209,6 +209,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_opensuse.spec
Expand Up @@ -220,6 +220,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
Expand Down
3 changes: 3 additions & 0 deletions dev/translation/sanity_check_en_langfiles.php
Expand Up @@ -295,6 +295,9 @@
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
// admin.lang
if (preg_match('/^DAV_ALLOW_PUBLIC_DIR/i', $value)) $qualifiedforclean=0;
if (preg_match('/^DAV_ALLOW_ECM_DIR/i', $value)) $qualifiedforclean=0;
// boxes.lang
if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0;
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
Expand Down
3 changes: 3 additions & 0 deletions htdocs/accountancy/admin/account.php
Expand Up @@ -121,6 +121,9 @@
if ($country_code)
{
$sqlfile = DOL_DOCUMENT_ROOT.'/install/mysql/data/llx_accounting_account_'.strtolower($country_code).'.sql';

// FIXME Get the ADD rowid and pass it + num of comapny * 100 000 000 to run_sql as a new parameter to say to update sql on the fly to add offset to rowid and account_parent value.

$result = run_sql($sqlfile, 1, 0, 1);
}

Expand Down
30 changes: 15 additions & 15 deletions htdocs/accountancy/admin/export.php
Expand Up @@ -5,7 +5,7 @@
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
Expand Down Expand Up @@ -50,11 +50,11 @@

$configuration = AccountancyExport::getTypeConfig();

$listparam = $configuration[param];
$listparam = $configuration['param'];

$listformat = $configuration[format];
$listformat = $configuration['format'];

$listcr = $configuration[cr];
$listcr = $configuration['cr'];


$model_option = array (
Expand Down Expand Up @@ -117,7 +117,7 @@
if (! $error) {
// reload
$configuration = AccountancyExport::getTypeConfig();
$listparam = $configuration[param];
$listparam = $configuration['param'];
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
Expand All @@ -142,27 +142,27 @@
foreach ($listparam as $key => $param) {
print ' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.'")'."\n";
print ' {'."\n";
print ' //console.log("'.$param[label].'");'."\n";
if (empty($param[ACCOUNTING_EXPORT_FORMAT])) {
print ' //console.log("'.$param['label'].'");'."\n";
if (empty($param['ACCOUNTING_EXPORT_FORMAT'])) {
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$conf->global->ACCOUNTING_EXPORT_FORMAT.'");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'."\n";
} else {
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param[ACCOUNTING_EXPORT_FORMAT].'");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param['ACCOUNTING_EXPORT_FORMAT'].'");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'."\n";
}
if (empty($param[ACCOUNTING_EXPORT_SEPARATORCSV])) {
if (empty($param['ACCOUNTING_EXPORT_SEPARATORCSV'])) {
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'."\n";
} else {
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV.'");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'."\n";
}
if (empty($param[ACCOUNTING_EXPORT_ENDLINE])) {
if (empty($param['ACCOUNTING_EXPORT_ENDLINE'])) {
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'."\n";
} else {
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'."\n";
}
if (empty($param[ACCOUNTING_EXPORT_DATE])) {
if (empty($param['ACCOUNTING_EXPORT_DATE'])) {
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'."\n";
} else {
Expand Down Expand Up @@ -257,15 +257,15 @@
print '<tr class="oddeven value">';

// Param
$label = $key[label];
$label = $key['label'];
print '<td width="50%">' . $langs->trans($label) . '</td>';

// Value
print '<td>';
if (is_array($key[param])) {
print $form->selectarray($label, $key[param], $conf->global->$label, 0);
if (is_array($key['param'])) {
print $form->selectarray($label, $key['param'], $conf->global->$label, 0);
} else {
print '<input type="text" size="20" id="'. $label .'" name="' . $key[label] . '" value="' . $conf->global->$label . '">';
print '<input type="text" size="20" id="'. $label .'" name="' . $key['label'] . '" value="' . $conf->global->$label . '">';
}

print '</td></tr>';
Expand Down
11 changes: 1 addition & 10 deletions htdocs/adherents/admin/website.php
Expand Up @@ -55,14 +55,12 @@
$amount=GETPOST('MEMBER_NEWFORM_AMOUNT');
$editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
$payonline=GETPOST('MEMBER_NEWFORM_PAYONLINE');
$email=GETPOST('MEMBER_PAYONLINE_SENDEMAIL');
$forcetype=GETPOST('MEMBER_NEWFORM_FORCETYPE');
$forcetype=GETPOST('MEMBER_NEWFORM_FORCETYPE');

$res=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$public,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$amount,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$editamount,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$payonline,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_PAYONLINE_SENDEMAIL",$email,'chaine',0,'',$conf->entity);
if ($forcetype < 0) $res=dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE",$conf->entity);
else $res=dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE",$forcetype,'chaine',0,'',$conf->entity);

Expand Down Expand Up @@ -211,13 +209,6 @@ function initfields()
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),0);
print "</td></tr>\n";

// Jump to an online payment page
print '<tr class="oddeven" id="tremail"><td>';
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
print '</td><td align="right">';
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';
print "</td></tr>\n";

print '</table>';

print '<center>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/card.php
Expand Up @@ -209,7 +209,7 @@
}
else
{
setEventMessages($object->errors, $object->error, 'errors');
setEventMessages($object->error, $object->errors, 'errors');
}
}

Expand Down
11 changes: 9 additions & 2 deletions htdocs/adherents/class/adherent.class.php
Expand Up @@ -464,7 +464,7 @@ function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdp
$action='update';

// Actions on extra fields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result=$this->insertExtraFields();
if ($result < 0)
Expand Down Expand Up @@ -531,6 +531,13 @@ function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdp
$luser->pass=$this->pass;
$luser->societe_id=$this->societe;

$luser->birth=$this->birth;
$luser->address=$this->address;
$luser->zip=$this->zip;
$luser->town=$this->town;
$luser->country_id=$this->country_id;
$luser->state_id=$this->state_id;

$luser->email=$this->email;
$luser->skype=$this->skype;
$luser->office_phone=$this->phone;
Expand Down Expand Up @@ -1340,7 +1347,7 @@ function subscription($date, $amount, $accountid=0, $operation='', $label='', $n
* @param string $num_chq Numero cheque (if Id bank account provided)
* @param string $emetteur_nom Name of cheque writer
* @param string $emetteur_banque Name of bank of cheque
* @param string $autocreatethirdparty Auto create new thirdparty if member not linked to a thirdparty and we request an option that generate invoice.
* @param string $autocreatethirdparty Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice.
* @return int <0 if KO, >0 if OK
*/
function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom='', $emetteur_banque='', $autocreatethirdparty=0)
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/class/adherent_type.class.php
Expand Up @@ -142,7 +142,7 @@ function create($user,$notrigger=0)
/**
* Met a jour en base donnees du type
*
* @param User $user Object user making change
* @param User $user Object user making change
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
Expand Down Expand Up @@ -172,7 +172,7 @@ function update($user,$notrigger=0)
$action='update';

// Actions on extra fields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result=$this->insertExtraFields();
if ($result < 0)
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/ldap.php
Expand Up @@ -75,7 +75,7 @@
setEventMessages($langs->trans("MemberSynchronized"), null, 'mesgs');
}
else {
setEventMessages($ldap->errors, $ldap->error, 'errors');
setEventMessages($ldap->error, $ldap->errors, 'errors');
}
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/subscription.php
Expand Up @@ -330,7 +330,7 @@

if (! $error)
{
// $db->commit();
$db->commit();
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/ihm.php
Expand Up @@ -309,8 +309,8 @@

// Firstname/Name
print '<tr><td class="titlefield">'.$langs->trans("FirstnameNamePosition").'</td><td>';
$array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"),1=>$langs->trans("Lastname").' '.$langs->trans("Firstname"));
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION',$array,(isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0));
$array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"), 1=>$langs->trans("Lastname").' '.$langs->trans("Firstname"));
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0));
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/mails_templates.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
Expand Down Expand Up @@ -989,7 +989,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
print '<td>';
if (! empty($conf->global->MAIN_MULTILANGS))
{
$selectedlang = $langs->defaultlang;
$selectedlang = GETPOSTISSET('langcode','aZ09')?GETPOST('langcode','aZ09'):$langs->defaultlang;
if ($context == 'edit') $selectedlang = $obj->{$fieldlist[$field]};
print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150');
}
Expand Down
4 changes: 3 additions & 1 deletion htdocs/admin/modulehelp.php
Expand Up @@ -313,7 +313,9 @@
{
$textexternal.='<br><strong>'.$langs->trans("Origin").':</strong> '.$langs->trans("ExternalModule",$dirofmodule);
if ($objMod->editor_name != 'dolibarr') $textexternal.='<br><strong>'.$langs->trans("Publisher").':</strong> '.(empty($objMod->editor_name)?$langs->trans("Unknown"):$objMod->editor_name);
if (! empty($objMod->editor_url) && ! preg_match('/dolibarr\.org/i',$objMod->editor_url)) $textexternal.='<br><strong>'.$langs->trans("Url").':</strong> <a href="'.$objMod->editor_url.'" target="_blank">'.$objMod->editor_url.'</a>';
$editor_url = $objMod->editor_url;
if (! preg_match('/^http/', $editor_url)) $editor_url = 'http://'.$editor_url;
if (! empty($objMod->editor_url) && ! preg_match('/dolibarr\.org/i',$objMod->editor_url)) $textexternal.='<br><strong>'.$langs->trans("Url").':</strong> <a href="'.$editor_url.'" target="_blank">'.$objMod->editor_url.'</a>';
$text.=$textexternal;
$text.='<br>';
}
Expand Down

0 comments on commit 9025fd5

Please sign in to comment.