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 *****
For users:
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
* \brief This script create a xml checksum file
*/
@ -45,7 +45,7 @@ $includeconstants=array();
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";
exit -1;
}
@ -68,11 +68,20 @@ while ($i < $argc)
$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 (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";
exit -1;
}

View File

@ -388,7 +388,7 @@ if ($nboftargetok) {
#-----------------------
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`;
print $ret."\n";
# 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') {
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
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;
$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') {
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
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;
$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') {
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
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;
$cssforamountpaymentcomplete = '';
}
@ -4001,7 +4001,7 @@ else if ($id > 0 || ! empty($ref))
if ($object->close_note)
$text .= '<br><br><b>' . $langs->trans("Reason") . '</b>:' . $object->close_note;
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;
$cssforamountpaymentcomplete = '';
}

View File

@ -760,7 +760,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$langs->load("projects");
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->sendtoid=0;

View File

@ -553,7 +553,7 @@ class Holiday extends CommonObject
} else {
$error++;
}
$sql.= " halfday = ".$this->halfday.",";
$sql.= " halfday = ".$this->halfday.",";
if(!empty($this->statut) && is_numeric($this->statut)) {
$sql.= " statut = ".$this->statut.",";
} else {
@ -714,10 +714,10 @@ class Holiday extends CommonObject
if ($infos_CP['statut'] == 4) continue; // ignore not validated holidays
if ($infos_CP['statut'] == 5) continue; // ignore not validated holidays
/*
var_dump("--");
var_dump("old: ".dol_print_date($infos_CP['date_debut'],'dayhour').' '.dol_print_date($infos_CP['date_fin'],'dayhour').' '.$infos_CP['halfday']);
var_dump("new: ".dol_print_date($dateStart,'dayhour').' '.dol_print_date($dateEnd,'dayhour').' '.$halfday);
*/
var_dump("--");
var_dump("old: ".dol_print_date($infos_CP['date_debut'],'dayhour').' '.dol_print_date($infos_CP['date_fin'],'dayhour').' '.$infos_CP['halfday']);
var_dump("new: ".dol_print_date($dateStart,'dayhour').' '.dol_print_date($dateEnd,'dayhour').' '.$halfday);
*/
if ($halfday == 0)
{
@ -797,7 +797,7 @@ class Holiday extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp";
$sql.= " WHERE cp.entity IN (".getEntity('holiday').")";
$sql.= " AND cp.fk_user = ".(int) $fk_user;
$sql.= " AND date_debut <= '".$this->db->idate($timestamp)."' AND date_fin >= '".$this->db->idate($timestamp)."'";
$sql.= " AND date_debut <= '".$this->db->idate($timestamp)."' AND date_fin >= '".$this->db->idate($timestamp)."'";
$resql = $this->db->query($sql);
if ($resql)
@ -837,7 +837,7 @@ class Holiday extends CommonObject
}
else dol_print_error($this->db);
return array('morning'=>$isavailablemorning, 'afternoon'=>$isavailableafternoon);
return array('morning'=>$isavailablemorning, 'afternoon'=>$isavailableafternoon);
}
@ -860,10 +860,10 @@ class Holiday extends CommonObject
//if ($option != 'nolink')
//{
// Add param to save lastsearch_values or not
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
// Add param to save lastsearch_values or not
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
//}
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
@ -1147,15 +1147,15 @@ class Holiday extends CommonObject
}
if ($result)
{
{
$this->db->commit();
return 1;
}
else
{
$this->db->rollback();
}
else
{
$this->db->rollback();
return -1;
}
}
}
return 0;
@ -1210,7 +1210,7 @@ class Holiday extends CommonObject
return 1;
}
else
{
{
return -1;
}
}
@ -1395,7 +1395,7 @@ class Holiday extends CommonObject
}
else
{
// We want only list of vacation balance for user ids
// We want only list of vacation balance for user ids
$sql = "SELECT DISTINCT cpu.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu, ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE cpu.fk_user = u.user";
@ -1427,7 +1427,7 @@ class Holiday extends CommonObject
return $stringlist;
}
else
{
{
// Erreur SQL
$this->error="Error ".$this->db->lasterror();
return -1;
@ -1454,46 +1454,46 @@ class Holiday extends CommonObject
else
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
$sql.= " AND u.statut > 0";
if ($filters) $sql.=$filters;
$sql.= " AND u.statut > 0";
if ($filters) $sql.=$filters;
$resql=$this->db->query($sql);
$resql=$this->db->query($sql);
// Si pas d'erreur SQL
if ($resql)
{
$i = 0;
$tab_result = $this->holiday;
$num = $this->db->num_rows($resql);
// Si pas d'erreur SQL
if ($resql)
{
$i = 0;
$tab_result = $this->holiday;
$num = $this->db->num_rows($resql);
// Boucles du listage des utilisateurs
while($i < $num) {
// Boucles du listage des utilisateurs
while($i < $num) {
$obj = $this->db->fetch_object($resql);
$obj = $this->db->fetch_object($resql);
$tab_result[$i]['rowid'] = $obj->rowid;
$tab_result[$i]['name'] = $obj->lastname; // deprecated
$tab_result[$i]['lastname'] = $obj->lastname;
$tab_result[$i]['firstname'] = $obj->firstname;
$tab_result[$i]['gender'] = $obj->gender;
$tab_result[$i]['status'] = $obj->statut;
$tab_result[$i]['employee'] = $obj->employee;
$tab_result[$i]['photo'] = $obj->photo;
$tab_result[$i]['fk_user'] = $obj->fk_user;
//$tab_result[$i]['type'] = $obj->type;
//$tab_result[$i]['nb_holiday'] = $obj->nb_holiday;
$tab_result[$i]['rowid'] = $obj->rowid;
$tab_result[$i]['name'] = $obj->lastname; // deprecated
$tab_result[$i]['lastname'] = $obj->lastname;
$tab_result[$i]['firstname'] = $obj->firstname;
$tab_result[$i]['gender'] = $obj->gender;
$tab_result[$i]['status'] = $obj->statut;
$tab_result[$i]['employee'] = $obj->employee;
$tab_result[$i]['photo'] = $obj->photo;
$tab_result[$i]['fk_user'] = $obj->fk_user;
//$tab_result[$i]['type'] = $obj->type;
//$tab_result[$i]['nb_holiday'] = $obj->nb_holiday;
$i++;
$i++;
}
// Retoune le tableau des utilisateurs
return $tab_result;
}
else
{
// Erreur SQL
$this->errors[]="Error ".$this->db->lasterror();
return -1;
}
// Retoune le tableau des utilisateurs
return $tab_result;
}
else
{
// Erreur SQL
$this->errors[]="Error ".$this->db->lasterror();
return -1;
}
}
else
{
@ -1637,32 +1637,32 @@ class Holiday extends CommonObject
$sql.= ")";
$resql=$this->db->query($sql);
if (! $resql)
{
$error++; $this->errors[]="Error ".$this->db->lasterror();
}
if (! $resql)
{
$error++; $this->errors[]="Error ".$this->db->lasterror();
}
if (! $error)
{
$this->optRowid = $this->db->last_insert_id(MAIN_DB_PREFIX."holiday_logs");
}
if (! $error)
{
$this->optRowid = $this->db->last_insert_id(MAIN_DB_PREFIX."holiday_logs");
}
// Commit or rollback
if ($error)
{
foreach($this->errors as $errmsg)
{
dol_syslog(get_class($this)."::addLogCP ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg);
}
$this->db->rollback();
return -1*$error;
}
else
{
$this->db->commit();
// Commit or rollback
if ($error)
{
foreach($this->errors as $errmsg)
{
dol_syslog(get_class($this)."::addLogCP ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg);
}
$this->db->rollback();
return -1*$error;
}
else
{
$this->db->commit();
return $this->optRowid;
}
}
}
/**
@ -1702,43 +1702,43 @@ class Holiday extends CommonObject
$resql=$this->db->query($sql);
// Si pas d'erreur SQL
if ($resql) {
if ($resql) {
$i = 0;
$tab_result = $this->logs;
$num = $this->db->num_rows($resql);
$i = 0;
$tab_result = $this->logs;
$num = $this->db->num_rows($resql);
// Si pas d'enregistrement
if(!$num) {
// Si pas d'enregistrement
if(!$num) {
return 2;
}
}
// On liste les résultats et on les ajoutent dans le tableau
while($i < $num) {
// On liste les résultats et on les ajoutent dans le tableau
while($i < $num) {
$obj = $this->db->fetch_object($resql);
$obj = $this->db->fetch_object($resql);
$tab_result[$i]['rowid'] = $obj->rowid;
$tab_result[$i]['date_action'] = $obj->date_action;
$tab_result[$i]['fk_user_action'] = $obj->fk_user_action;
$tab_result[$i]['fk_user_update'] = $obj->fk_user_update;
$tab_result[$i]['type_action'] = $obj->type_action;
$tab_result[$i]['prev_solde'] = $obj->prev_solde;
$tab_result[$i]['new_solde'] = $obj->new_solde;
$tab_result[$i]['fk_type'] = $obj->fk_type;
$tab_result[$i]['rowid'] = $obj->rowid;
$tab_result[$i]['date_action'] = $obj->date_action;
$tab_result[$i]['fk_user_action'] = $obj->fk_user_action;
$tab_result[$i]['fk_user_update'] = $obj->fk_user_update;
$tab_result[$i]['type_action'] = $obj->type_action;
$tab_result[$i]['prev_solde'] = $obj->prev_solde;
$tab_result[$i]['new_solde'] = $obj->new_solde;
$tab_result[$i]['fk_type'] = $obj->fk_type;
$i++;
}
// Retourne 1 et ajoute le tableau à la variable
$this->logs = $tab_result;
return 1;
}
else
{
// Erreur SQL
$this->error="Error ".$this->db->lasterror();
return -1;
}
$i++;
}
// Retourne 1 et ajoute le tableau à la variable
$this->logs = $tab_result;
return 1;
}
else
{
// Erreur SQL
$this->error="Error ".$this->db->lasterror();
return -1;
}
}

View File

@ -220,6 +220,7 @@ if (!empty($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);
$filters.= ' AND employee = 1'; // Only employee users are visible
$listUsers = $holiday->fetchUsers(false, true, $filters);
if (is_numeric($listUsers) && $listUsers < 0)
@ -356,8 +357,10 @@ else
print '<td>';
if ($canedit) print '<input type="text"'.($canedit?'':' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>';
print '</td>';
// Button modify
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"/>';
}

View File

@ -48,7 +48,7 @@ $contextpage= GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'myobjectl
$backtopage = GETPOST('backtopage','alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss','aZ'); // Option for the css output (always '' except when 'print')
$childis = $user->getAllChildIds(1);
$childids = $user->getAllChildIds(1);
// Security check
$socid=0;
@ -107,7 +107,6 @@ $fieldstosearchall = array(
'uu.firstname'=>'EmployeeFirstname'
);
$childids = $user->getAllChildIds(1);
/*
@ -275,14 +274,16 @@ if ($id > 0)
$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)
{
$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
{
$result = $holiday->fetchAll($order,$filter); // Load array $holiday->holiday
$result = $holiday->fetchAll($order, $filter);
}
// Si erreur SQL
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
ProjectsAndTasksLines=Projects and tasks
ProjectCreatedInDolibarr=Project %s created
ProjectValidatedInDolibarr=Project %s validated
ProjectModifiedInDolibarr=Project %s modified
TaskCreatedInDolibarr=Task %s created
TaskModifiedInDolibarr=Task %s modified

View File

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

View File

@ -1225,7 +1225,7 @@ class Product extends CommonObject
$sql2.= " SET ";
$sql2.= " label='".$this->db->escape($this->label)."',";
$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)."'";
}
else
@ -1235,7 +1235,7 @@ class Product extends CommonObject
$sql2.= ")";
$sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->label)."',";
$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.= ")";
}
dol_syslog(get_class($this).'::setMultiLangs key = current_lang = '.$key);
@ -1260,7 +1260,7 @@ class Product extends CommonObject
$sql2.= " SET ";
$sql2.= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',";
$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)."'";
}
else
@ -1270,7 +1270,7 @@ class Product extends CommonObject
$sql2.= ")";
$sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->multilangs["$key"]["label"])."',";
$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.= ")";
}

View File

@ -251,7 +251,7 @@ if ($action == 'edit')
print '<div class="underbanner clearboth"></div>';
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>';
$doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
$doleditor->Create();