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

This commit is contained in:
Laurent Destailleur 2022-06-01 15:57:35 +02:00
commit 32f60e191f
22 changed files with 122 additions and 67 deletions

View File

@ -732,11 +732,11 @@ class AccountingAccount extends CommonObject
global $hookmanager;
// Instantiate hooks for external modules
$hookmanager->initHooks(array('accoutancyBindingCalculation'));
$hookmanager->initHooks(array('accountancyBindingCalculation'));
// Execute hook accoutancyBindingCalculation
// Execute hook accountancyBindingCalculation
$parameters = array('buyer' => $buyer, 'seller' => $seller, 'product' => $product, 'facture' => $facture, 'factureDet' => $factureDet ,'accountingAccount'=>$accountingAccount, $type);
$reshook = $hookmanager->executeHooks('accoutancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks
$reshook = $hookmanager->executeHooks('accountancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) {
if ($type == 'customer') {

View File

@ -1065,12 +1065,12 @@ if ($rowid > 0) {
// Bank account
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("FinancialAccount").'</td><td>';
print img_picto('', 'bank_account');
$form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2);
$form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2, '', 0, 'minwidth200');
print "</td></tr>\n";
// Payment mode
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
$form->select_types_paiements(GETPOST('operation'), 'operation', '', 2);
$form->select_types_paiements(GETPOST('operation'), 'operation', '', 2, 1, 0, 0, 1, 'minwidth200');
print "</td></tr>\n";
// Date of payment

View File

@ -91,7 +91,7 @@ if ($action == 'updateMask') {
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=bom&file=SPECIMEN.pdf");
return;
} else {
setEventMessages($module->error, null, 'errors');
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
} else {
@ -174,7 +174,7 @@ $head = bomAdminPrepareHead();
print dol_get_fiche_head($head, 'settings', $langs->trans("BOMs"), -1, 'bom');
/*
* BOMs Numbering model
* Numbering module
*/
print load_fiche_titre($langs->trans("BOMsNumberingModules"), '', '');
@ -200,10 +200,11 @@ foreach ($dirmodels as $reldir) {
while (($file = readdir($handle)) !== false) {
if (substr($file, 0, 8) == 'mod_bom_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
$file = substr($file, 0, dol_strlen($file) - 4);
$classname = $file;
require_once $dir.$file.'.php';
$module = new $file($db);
$module = new $classname($db);
// Show modules according to features level
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
@ -218,7 +219,7 @@ foreach ($dirmodels as $reldir) {
print $module->info();
print '</td>';
// Show example of numbering model
// Show example of numbering module
print '<td class="nowrap">';
$tmp = $module->getExample();
if (preg_match('/^Error/', $tmp)) {
@ -275,13 +276,13 @@ foreach ($dirmodels as $reldir) {
}
print "</table>";
print "</div>";
print "<br>\n";
/*
* Document templates generators
*/
print "<br>\n";
print load_fiche_titre($langs->trans("BOMsModelModule"), '', '');
// Load array def with activated templates
@ -305,8 +306,8 @@ if ($resql) {
print '<div class="div-table-responsive-no-min">';
print "<table class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n";
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
@ -362,13 +363,13 @@ foreach ($dirmodels as $reldir) {
// Active
if (in_array($name, $def)) {
print '<td class="center">'."\n";
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>';
print '</td>';
} else {
print '<td class="center">'."\n";
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>";
}
@ -377,7 +378,7 @@ foreach ($dirmodels as $reldir) {
if ($conf->global->BOM_ADDON_PDF == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
}
print '</td>';
@ -419,12 +420,12 @@ foreach ($dirmodels as $reldir) {
print '</table>';
print '</div>';
print "<br>";
/*
* Other options
*/
print "<br>";
print load_fiche_titre($langs->trans("OtherOptions"), '', '');
print '<div class="div-table-responsive-no-min">';

View File

@ -2563,7 +2563,7 @@ if ($action == 'create' && $usercancreate) {
}
// Create intervention
if ($conf->ficheinter->enabled) {
if (!empty($conf->ficheinter->enabled)) {
$langs->load("interventions");
if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) {

View File

@ -52,7 +52,7 @@ $hookmanager->initHooks(array('paymentcard', 'globalcard'));
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
$result = restrictedArea($user, $object->element, $object->id, 'paiement', '');
$result = restrictedArea($user, $object->element, $object->id, 'paiement');
// Security check
if ($user->socid) {

View File

@ -259,10 +259,6 @@ if (empty($reshook)) {
}
$id = $object->create($user);
if ($id < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
if ($id > 0) {
dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
@ -374,6 +370,9 @@ if (empty($reshook)) {
setEventMessages($object->error, $object->errors, 'errors');
$error++;
}
if ($error) {
$action = 'create';
}
} else {
$result = $object->create($user);
if ($result > 0) {

View File

@ -131,7 +131,7 @@ class box_graph_nb_tickets_type extends ModeleBoxes
}
foreach ($listofoppcode as $rowid => $code) {
$dataseries[] = array(
'label' => $langs->getLabelFromKey($this->db, 'TicketTypeShort' . $code, 'c_ticket_category', 'code', 'label', $code),
'label' => $langs->getLabelFromKey($this->db, 'TicketTypeShort' . $code, 'c_ticket_type', 'code', 'label', $code),
'data' => (empty($data[$code]) ? 0 : $data[$code])
);
}

View File

@ -152,7 +152,7 @@ class box_graph_ticket_by_severity extends ModeleBoxes
}
foreach ($listofoppcode as $rowid => $code) {
$dataseries[] = array(
'label' => $langs->getLabelFromKey($this->db, 'TicketSeverityShort' . $code, 'c_ticket_category', 'code', 'label', $code),
'label' => $langs->getLabelFromKey($this->db, 'TicketSeverityShort' . $code, 'c_ticket_severity', 'code', 'label', $code),
'data' => (empty($data[$code]) ? 0 : $data[$code])
);
}

View File

@ -6873,7 +6873,7 @@ abstract class CommonObject
$out .= '</select>';
} elseif ($type == 'checkbox') {
$value_arr = explode(',', $value);
$out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, '', 0, '100%');
$out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, $morecss, 0, '100%');
} elseif ($type == 'radio') {
$out = '';
foreach ($param['options'] as $keyopt => $val) {
@ -7846,14 +7846,16 @@ abstract class CommonObject
if (!is_numeric($this->array_options['options_'.$key])) { // For backward compatibility
$datenotinstring = $this->db->jdate($datenotinstring);
}
$value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)) ? dol_mktime(12, 0, 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year", 'int', 3)) : $datenotinstring;
$datekey = $keyprefix.'options_'.$key.$keysuffix;
$value = (GETPOSTISSET($datekey)) ? dol_mktime(12, 0, 0, GETPOST($datekey.'month', 'int', 3), GETPOST($datekey.'day', 'int', 3), GETPOST($datekey.'year', 'int', 3)) : $datenotinstring;
}
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('datetime'))) {
$datenotinstring = $this->array_options['options_'.$key];
if (!is_numeric($this->array_options['options_'.$key])) { // For backward compatibility
$datenotinstring = $this->db->jdate($datenotinstring);
}
$value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)) ? dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."sec", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."month", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year", 'int', 3), 'tzuserrel') : $datenotinstring;
$timekey = $keyprefix.'options_'.$key.$keysuffix;
$value = (GETPOSTISSET($timekey)) ? dol_mktime(GETPOST($timekey.'hour', 'int', 3), GETPOST($timekey.'min', 'int', 3), GETPOST($timekey.'sec', 'int', 3), GETPOST($timekey.'month', 'int', 3), GETPOST($timekey.'day', 'int', 3), GETPOST($timekey.'year', 'int', 3), 'tzuserrel') : $datenotinstring;
}
// Convert float submited string into real php numeric (value in memory must be a php numeric)
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('price', 'double'))) {
@ -7861,7 +7863,7 @@ abstract class CommonObject
}
// HTML, text, select, integer and varchar: take into account default value in database if in create mode
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'varchar', 'select', 'int'))) {
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'varchar', 'select', 'int', 'boolean'))) {
if ($action == 'create') {
$value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) || $value) ? $value : $extrafields->attributes[$this->table_element]['default'][$key];
}
@ -7913,7 +7915,7 @@ abstract class CommonObject
// a first td column was already output (and may be another on before if MAIN_VIEW_LINE_NUMBER set), so this td is the next one
$out .= '<td '.($html_id ? 'id="'.$html_id.'" ' : '').' class="'.$this->element.'_extras_'.$key.'" '.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
} elseif ($display_type == 'line') {
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="'.$this->element.'_extras_'.$key.'">';
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="'.$this->element.'_extras_'.$key.' extra_inline_'.$extrafields->attributes[$this->table_element]['type'][$key].'">';
}
switch ($mode) {

View File

@ -1644,15 +1644,18 @@ class ExtraFields
}
}
} else {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$toprint = array();
$obj = $this->db->fetch_object($resql);
$c = new Categorie($this->db);
$c->fetch($obj->rowid);
$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
foreach ($ways as $way) {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.img_object('', 'category').' '.$way.'</li>';
if ($obj->rowid) {
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$c = new Categorie($this->db);
$result = $c->fetch($obj->rowid);
if ($result > 0) {
$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
foreach ($ways as $way) {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . img_object('', 'category') . ' ' . $way . '</li>';
}
}
}
$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
}

View File

@ -128,11 +128,9 @@ function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issu
} else {
$ref_prodserv = $prodser->ref; // Show local ref only
}
$ref_prodserv .= " - ";
}
$libelleproduitservice = $prefix_prodserv.$ref_prodserv.$libelleproduitservice;
$libelleproduitservice = $prefix_prodserv.$ref_prodserv.($libelleproduitservice ? " - " : "").$libelleproduitservice;
}
}

View File

@ -2203,7 +2203,7 @@ function dol_bc($var, $moreclass = '')
*/
function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs = '', $mode = 0, $extralangcode = '')
{
global $conf, $langs;
global $conf, $langs, $hookmanager;
$ret = '';
$countriesusingstate = array('AU', 'CA', 'US', 'IN', 'GB', 'ES', 'UK', 'TR', 'CN'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
@ -2269,6 +2269,14 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs
$langs->load("dict");
$ret .= (empty($object->country_code) ? '' : ($ret ? $sep : '').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)));
}
if ($hookmanager) {
$parameters = array('withcountry' => $withcountry, 'sep' => $sep, 'outputlangs' => $outputlangs,'mode' => $mode, 'extralangcode' => $extralangcode);
$reshook = $hookmanager->executeHooks('formatAddress', $parameters, $object);
if ($reshook > 0) {
$ret = '';
}
$ret .= $hookmanager->resPrint;
}
return $ret;
}
@ -10043,9 +10051,11 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
// Js Confirm button
if ($userRight && !empty($params['confirm'])) {
if (!is_array($params['confirm'])) {
$params['confirm'] = array(
'url' => $url . (strpos($url, '?') > 0 ? '&' : '?') . 'confirm=yes'
);
$params['confirm'] = array();
}
if (empty($params['confirm']['url'])) {
$params['confirm']['url'] = $url . (strpos($url, '?') > 0 ? '&' : '?') . 'confirm=yes';
}
// for js desabled compatibility set $url as call to confirm action and $params['confirm']['url'] to confirmed action

View File

@ -238,7 +238,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
//dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft");
//print "user_id=".$user->id.", features=".$features.", feature2=".$feature2.", objectid=".$objectid;
//print ", dbtablename=".$dbtablename.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select;
//print ", dbtablename=".$tableandshare.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select;
//print ", perm: ".$features."->".$feature2."=".($user->rights->$features->$feature2->lire)."<br>";
$parentfortableentity = '';
@ -539,8 +539,8 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
if (!$user->rights->fournisseur->facture->creer) {
$deleteok = 0;
}
} elseif ($feature == 'payment') { // Permission to delete a payment of an invoice is permission to edit an invoice.
if (!$user->rights->facture->creer) {
} elseif ($feature == 'payment') {
if (!$user->rights->facture->paiement) {
$deleteok = 0;
}
} elseif ($feature == 'banque') {

View File

@ -169,7 +169,7 @@ class doc_generic_bom_odt extends ModelePDFBom
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=boms&file=invoices/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=boms/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
}
$texte .= '</div>';
}
@ -406,10 +406,22 @@ class doc_generic_bom_odt extends ModelePDFBom
$foundtagforlines = 0;
dol_syslog($e->getMessage(), LOG_INFO);
}
if ($foundtagforlines) {
$linenumber = 0;
foreach ($object->lines as $line) {
$linenumber++;
if ($line->fk_product > 0) {
$line->fetch_product();
$line->product_ref = $line->product->ref;
$line->product_desc = $line->product->description;
$line->product_label = $line->product->label;
$line->product_type = $line->product->type;
$line->product_barcode = $line->product->barcode;
}
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook

View File

@ -429,7 +429,7 @@ class modRecruitment extends DolibarrModules
$sql = array();
// Document template
$moduledir = 'mymodule';
$moduledir = 'recruitment';
$myTmpObjects = array();
$myTmpObjects['RecruitmentJobPosition'] = array('includerefgeneration'=>1, 'includedocgeneration'=>1);
@ -437,10 +437,10 @@ class modRecruitment extends DolibarrModules
if ($myTmpObjectKey == 'MyObject') {
continue;
}
if ($myTmpObjectArray['includerefgeneration']) {
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/mymodule/template_myobjects.odt';
$dirodt = DOL_DATA_ROOT.'/doctemplates/mymodule';
$dest = $dirodt.'/template_myobjects.odt';
if ($myTmpObjectArray['includedocgeneration']) {
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/'.$moduledir.'/template_recruitmentjobposition.odt';
$dirodt = DOL_DATA_ROOT.'/doctemplates/'.$moduledir;
$dest = $dirodt.'/template_recruitmentjobposition.odt';
if (file_exists($src) && !file_exists($dest)) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@ -456,6 +456,7 @@ class modRecruitment extends DolibarrModules
$sql = array_merge($sql, array(
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard_".strtolower($myTmpObjectKey)."' AND type = '".$this->db->escape(strtolower($myTmpObjectKey))."' AND entity = ".((int) $conf->entity),
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard_".strtolower($myTmpObjectKey)."','".$this->db->escape(strtolower($myTmpObjectKey))."',".((int) $conf->entity).")",
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'generic_".strtolower($myTmpObjectKey)."_odt' AND type = '".$this->db->escape(strtolower($myTmpObjectKey))."' AND entity = ".((int) $conf->entity),
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('generic_".strtolower($myTmpObjectKey)."_odt', '".$this->db->escape(strtolower($myTmpObjectKey))."', ".((int) $conf->entity).")"
));

View File

@ -390,11 +390,15 @@ if (empty($reshook)) {
}
}
} else {
$mesg = $srcobject->error;
$langs->load("errors");
setEventMessages($srcobject->error, $srcobject->errors, 'errors');
$action = 'create';
$error++;
}
} else {
$mesg = $object->error;
$langs->load("errors");
setEventMessages($object->error, $object->errors, 'errors');
$action = 'create';
$error++;
}
} else {
@ -418,12 +422,14 @@ if (empty($reshook)) {
$langs->load("errors");
setEventMessages($object->error, $object->errors, 'errors');
$action = 'create';
$error++;
}
}
}
} else {
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty"));
$action = 'create';
$error++;
}
} elseif ($action == 'update' && $user->rights->ficheinter->creer) {
$object->socid = $socid;

View File

@ -313,8 +313,6 @@ WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connec
WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here.
WarningPaypalPaymentNotCompatibleWithStrict=The value 'Strict' makes the online payment features not working correctly. Use 'Lax' instead.
<<<<<<< HEAD
<<<<<<< HEAD
# Validate
RequireValidValue = Value not valid
RequireAtLeastXString = Requires at least %s character(s)
@ -335,9 +333,3 @@ BadSetupOfField = Error bad setup of field
BadSetupOfFieldClassNotFoundForValidation = Error bad setup of field : Class not found for validation
BadSetupOfFieldFileNotFound = Error bad setup of field : File not found for inclusion
BadSetupOfFieldFetchNotCallable = Error bad setup of field : Fetch not callable on class
=======
=======
>>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git
>>>>>>> branch '14.0' of git@github.com:Dolibarr/dolibarr.git
=======
>>>>>>> branch '14.0' of git@github.com:Dolibarr/dolibarr.git

View File

@ -119,6 +119,8 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) {
setEventMessages($object->error, $object->errors, 'errors');
$action = 'edit';
}
} else {
$action = 'edit';
}
} else {
$action = 'edit';

View File

@ -51,7 +51,7 @@ abstract class ModelePDFRecruitmentCandidature extends CommonDocGenerator
// phpcs:enable
global $conf;
$type = 'recruitmentjobposition';
$type = 'recruitmentjobcandidature';
$list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';

View File

@ -319,8 +319,20 @@ if (empty($reshook)) {
if (!$error) {
if ($origin && $originid) {
$element = 'supplier_proposal';
$subelement = 'supplier_proposal';
$element = $subelement = $origin;
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
$element = $regs[1];
$subelement = $regs[2];
}
// For compatibility
if ($element == 'order') {
$element = $subelement = 'commande';
}
if ($element == 'propal') {
$element = 'comm/propal';
$subelement = 'propal';
}
$object->origin = $origin;
$object->origin_id = $originid;
@ -1079,8 +1091,20 @@ if ($action == 'create') {
// Load objectsrc
if (!empty($origin) && !empty($originid)) {
$element = 'supplier_proposal';
$subelement = 'supplier_proposal';
$element = $subelement = GETPOST('origin');
if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin'), $regs)) {
$element = $regs[1];
$subelement = $regs[2];
}
// For compatibility
if ($element == 'order' || $element == 'commande') {
$element = $subelement = 'commande';
}
if ($element == 'propal') {
$element = 'comm/propal';
$subelement = 'propal';
}
dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');

View File

@ -7448,6 +7448,11 @@ if (!empty($conf->global->THEME_CUSTOM_CSS)) {
?>
div.extra_inline_chkbxlst,
div.extra_inline_checkbox {
min-width:150px;
}
/* Must be at end */
div.flot-text .flot-tick-label .tickLabel, .fa-color-unset {
color: unset;