Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	ChangeLog
This commit is contained in:
Laurent Destailleur 2018-03-22 14:08:43 +01:00
commit 9980a5fbd0
12 changed files with 209 additions and 127 deletions

View File

@ -20,6 +20,73 @@ Following changes may create regressions for some external modules, but were nec
***** ChangeLog for 7.0.1 compared to 7.0.0 *****
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
FIX: #8200
FIX: #8219
FIX: #8232
FIX: #8269
FIX: #8277
FIX: #8285 Extrafields now reported by /api/index.php/agendaevents/{id}
FIX: #8289 add a configuration for stock calculation
FIX: Activate all also if there are inactive services
FIX: add planned delivery to order exports
FIX: approval date was not visible if leave was canceled after
FIX: avoid "Array" on screen
FIX: Avoid empty value to fk_multicurrency attribute
FIX: Bad var for substitution of free text
FIX: Can't activate tasks on projects configuration
FIX: Can use odx templates that does not include lines tags
FIX: check shipping on delete order
FIX: check verif exped on delete order
FIX: comment on tasks
FIX: country must not be mandatory for accounting report groups
FIX: css
FIX: Delete tasks on project delete will now trigger TASK_DELETE
FIX: Do not lose filter when editing comment of a time spent in task view
FIX: duplicate confirm message. Missing reposition class
FIX: Duplicate product_type asignement on order addline
FIX: email use the validate user instead of approver in holiday approval
FIX: Error management in leave request
FIX: for nondisplay of fk_element 's id in REST API response
FIX: Generic substitution of constant disabled for sensitive constant
FIX: if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back
FIX: Import process must stop after ending line nb to import
FIX: Infinite loop on deletion of temp file when there is symbolic links
FIX: Input of holiday for subordinates was ko
FIX: invoice creation fails when next date not defined
FIX: Label of event show twice
FIX: letter for month March
FIX: Look and feel v7
FIX: Make a redirect after the remove_file action to avoid deletion done
FIX: migration script for product photo
FIX: missing email of customer in stripe info payments
FIX: missing object entity in fetch
FIX: Missing restore_lastsearch_values
FIX: multicompany compatibility and fix reports
FIX: natural search double quote
FIX: navigation and filters on holiday list
FIX: Parameter must be an array or an object that implements Countable
FIX: Payment mode not correctly set in donation and document
FIX: Permission in list of holiday
FIX: Properties updated if update successfull.
FIX: reverse field to have object loaded in doaction
FIX: Saving wrong localtax on order addline
FIX: Search criteria on vat
FIX: security report by DIGITEMIS CYBERSECURITY & PRIVACY
FIX: show status on societe banner
FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup
FIX: Subscription events not recorded into agenda
FIX: Subscription not correctly log in blockedlog
FIX: Temporary dir for mail files must be cleaned at beginning of form
FIX: Trad and creation date in subscription create
FIX: translation of holiday types
FIX: Unknown column 'pl.amount_requested' in compta/prelevement/factures.php
FIX: Useless clean of tree
FIX: Use of undefined constant _ROWS_2
FIX: warning when adding ECM files using old photo path
***** ChangeLog for 7.0.0 compared to 6.0.5 ***** ***** ChangeLog for 7.0.0 compared to 6.0.5 *****
For users: For users:
NEW: Add a preview icon after files that can be previewed (pdf + images) NEW: Add a preview icon after files that can be previewed (pdf + images)

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file build/generate_filecheck_xml.php * \file build/generate_filelist_xml.php
* \ingroup dev * \ingroup dev
* \brief This script create a xml checksum file * \brief This script create a xml checksum file
*/ */
@ -45,7 +45,7 @@ $includeconstants=array();
if (empty($argv[1])) if (empty($argv[1]))
{ {
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=auto|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1; exit -1;
} }
@ -68,11 +68,20 @@ while ($i < $argc)
$i++; $i++;
} }
// If release is auto, we take current version
$tmpver=explode('-', $release, 2);
if ($tmpver[0] == 'auto')
{
$release=DOL_VERSION;
if ($tmpver[1]) $release.='-'.$tmpver[1];
}
if (empty($includecustom)) if (empty($includecustom))
{ {
if (DOL_VERSION != $release) $tmpver=explode('-', $release, 2);
if (DOL_VERSION != $tmpver[0])
{ {
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n"; print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpver[0].')'."\n";
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n"; print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
exit -1; exit -1;
} }

View File

@ -388,7 +388,7 @@ if ($nboftargetok) {
#----------------------- #-----------------------
if ($CHOOSEDTARGET{'-CHKSUM'}) 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"; print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`; $ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
print $ret."\n"; print $ret."\n";
# Copy to final dir # Copy to final dir

View File

@ -3974,7 +3974,7 @@ else if ($id > 0 || ! empty($ref))
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') { if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') {
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">'; print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1); print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1);
print '</td><td align="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td>&nbsp;</td></tr>'; print '</td><td align="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = ''; $cssforamountpaymentcomplete = '';
} }
@ -3982,7 +3982,7 @@ else if ($id > 0 || ! empty($ref))
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') { if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') {
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">'; print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1); print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1);
print '</td><td align="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td>&nbsp;</td></tr>'; print '</td><td align="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td>&nbsp;</td></tr>';
// $resteapayeraffiche=0; // $resteapayeraffiche=0;
$cssforamountpaymentcomplete = ''; $cssforamountpaymentcomplete = '';
} }
@ -3990,7 +3990,7 @@ else if ($id > 0 || ! empty($ref))
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') { if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') {
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">'; print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1); print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1);
print '</td><td align="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td>&nbsp;</td></tr>'; print '</td><td align="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = ''; $cssforamountpaymentcomplete = '';
} }
@ -4001,7 +4001,7 @@ else if ($id > 0 || ! empty($ref))
if ($object->close_note) if ($object->close_note)
$text .= '<br><br><b>' . $langs->trans("Reason") . '</b>:' . $object->close_note; $text .= '<br><br><b>' . $langs->trans("Reason") . '</b>:' . $object->close_note;
print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1); print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1);
print '</td><td align="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td>&nbsp;</td></tr>'; print '</td><td align="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = ''; $cssforamountpaymentcomplete = '';
} }

View File

@ -760,7 +760,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$langs->load("projects"); $langs->load("projects");
if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectModifiedInDolibarr",$object->ref); if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectModifiedInDolibarr",$object->ref);
$object->actionmsg=$langs->transnoentities("ProjectModifieddInDolibarr",$object->ref); $object->actionmsg=$langs->transnoentities("ProjectModifiedInDolibarr",$object->ref);
$object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref;
$object->sendtoid=0; $object->sendtoid=0;

View File

@ -220,6 +220,7 @@ if (!empty($search_name)) {
$filters.=natural_search(array('u.firstname','u.lastname'), $search_name); $filters.=natural_search(array('u.firstname','u.lastname'), $search_name);
} }
if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2); if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2);
$filters.= ' AND employee = 1'; // Only employee users are visible
$listUsers = $holiday->fetchUsers(false, true, $filters); $listUsers = $holiday->fetchUsers(false, true, $filters);
if (is_numeric($listUsers) && $listUsers < 0) if (is_numeric($listUsers) && $listUsers < 0)
@ -356,8 +357,10 @@ else
print '<td>'; print '<td>';
if ($canedit) print '<input type="text"'.($canedit?'':' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>'; if ($canedit) print '<input type="text"'.($canedit?'':' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>';
print '</td>'; print '</td>';
// Button modify
print '<td>'; print '<td>';
if (! empty($user->rights->holiday->define_holiday)) if (! empty($user->rights->holiday->define_holiday)) // Allowed to set the balance of any user
{ {
print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/>'; print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/>';
} }

View File

@ -48,7 +48,7 @@ $contextpage= GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'myobjectl
$backtopage = GETPOST('backtopage','alpha'); // Go back to a dedicated page $backtopage = GETPOST('backtopage','alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss','aZ'); // Option for the css output (always '' except when 'print') $optioncss = GETPOST('optioncss','aZ'); // Option for the css output (always '' except when 'print')
$childis = $user->getAllChildIds(1); $childids = $user->getAllChildIds(1);
// Security check // Security check
$socid=0; $socid=0;
@ -107,7 +107,6 @@ $fieldstosearchall = array(
'uu.firstname'=>'EmployeeFirstname' 'uu.firstname'=>'EmployeeFirstname'
); );
$childids = $user->getAllChildIds(1);
/* /*
@ -275,14 +274,16 @@ if ($id > 0)
$search_employee = $user_id; $search_employee = $user_id;
} }
// Récupération des congés payés de l'utilisateur ou de tous les users // Récupération des congés payés de l'utilisateur ou de tous les users de sa hierarchy
// Load array $holiday->holiday
if (empty($user->rights->holiday->read_all) || $id > 0) if (empty($user->rights->holiday->read_all) || $id > 0)
{ {
$result = $holiday->fetchByUser($user_id,$order,$filter); // Load array $holiday->holiday if ($id > 0) $result = $holiday->fetchByUser($id, $order, $filter);
else $result = $holiday->fetchByUser(join(',',$childids), $order, $filter);
} }
else else
{ {
$result = $holiday->fetchAll($order,$filter); // Load array $holiday->holiday $result = $holiday->fetchAll($order, $filter);
} }
// Si erreur SQL // Si erreur SQL
if ($result == '-1') if ($result == '-1')

View File

@ -140,6 +140,7 @@ ProjectReportDate=Change task dates according to new project start date
ErrorShiftTaskDate=Impossible to shift task date according to new project start date ErrorShiftTaskDate=Impossible to shift task date according to new project start date
ProjectsAndTasksLines=Projects and tasks ProjectsAndTasksLines=Projects and tasks
ProjectCreatedInDolibarr=Project %s created ProjectCreatedInDolibarr=Project %s created
ProjectValidatedInDolibarr=Project %s validated
ProjectModifiedInDolibarr=Project %s modified ProjectModifiedInDolibarr=Project %s modified
TaskCreatedInDolibarr=Task %s created TaskCreatedInDolibarr=Task %s created
TaskModifiedInDolibarr=Task %s modified TaskModifiedInDolibarr=Task %s modified

View File

@ -33,6 +33,7 @@ PropalStatusSigned=Signed (needs billing)
PropalStatusNotSigned=Not signed (closed) PropalStatusNotSigned=Not signed (closed)
PropalStatusBilled=Billed PropalStatusBilled=Billed
PropalStatusDraftShort=Draft PropalStatusDraftShort=Draft
PropalStatusValidatedShort=Validated
PropalStatusClosedShort=Closed PropalStatusClosedShort=Closed
PropalStatusSignedShort=Signed PropalStatusSignedShort=Signed
PropalStatusNotSignedShort=Not signed PropalStatusNotSignedShort=Not signed

View File

@ -1225,7 +1225,7 @@ class Product extends CommonObject
$sql2.= " SET "; $sql2.= " SET ";
$sql2.= " label='".$this->db->escape($this->label)."',"; $sql2.= " label='".$this->db->escape($this->label)."',";
$sql2.= " description='".$this->db->escape($this->description)."'"; $sql2.= " description='".$this->db->escape($this->description)."'";
if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->note)."'"; if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->other)."'";
$sql2.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; $sql2.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'";
} }
else else
@ -1235,7 +1235,7 @@ class Product extends CommonObject
$sql2.= ")"; $sql2.= ")";
$sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->label)."',"; $sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->label)."',";
$sql2.= " '".$this->db->escape($this->description)."'"; $sql2.= " '".$this->db->escape($this->description)."'";
if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->note)."'"; if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->other)."'";
$sql2.= ")"; $sql2.= ")";
} }
dol_syslog(get_class($this).'::setMultiLangs key = current_lang = '.$key); dol_syslog(get_class($this).'::setMultiLangs key = current_lang = '.$key);
@ -1260,7 +1260,7 @@ class Product extends CommonObject
$sql2.= " SET "; $sql2.= " SET ";
$sql2.= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2.= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',";
$sql2.= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'"; $sql2.= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'";
if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->multilangs["$key"]["note"])."'"; if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->multilangs["$key"]["other"])."'";
$sql2.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; $sql2.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'";
} }
else else
@ -1270,7 +1270,7 @@ class Product extends CommonObject
$sql2.= ")"; $sql2.= ")";
$sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->multilangs["$key"]["label"])."',";
$sql2.= " '".$this->db->escape($this->multilangs["$key"]["description"])."'"; $sql2.= " '".$this->db->escape($this->multilangs["$key"]["description"])."'";
if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->note)."'"; if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->multilangs["$key"]["other"])."'";
$sql2.= ")"; $sql2.= ")";
} }

View File

@ -251,7 +251,7 @@ if ($action == 'edit')
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td class="tdtop titlefieldcreate fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" size="40" value="'.$object->multilangs[$key]["label"].'"></td></tr>'; print '<tr><td class="tdtop titlefieldcreate fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" size="40" value="'.dol_escape_htmltag($object->multilangs[$key]["label"]).'"></td></tr>';
print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>'; print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>';
$doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
$doleditor->Create(); $doleditor->Create();