mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
This commit is contained in:
@@ -256,10 +256,18 @@ if ($action == 'builddoc') {
|
||||
|
||||
if (!$mesg) {
|
||||
$outputlangs = $langs;
|
||||
$previousConf = getDolGlobalInt('TCPDF_THROW_ERRORS_INSTEAD_OF_DIE');
|
||||
$conf->global->TCPDF_THROW_ERRORS_INSTEAD_OF_DIE = 1;
|
||||
|
||||
|
||||
// This generates and send PDF to output
|
||||
// TODO Move
|
||||
try {
|
||||
$result = doc_label_pdf_create($db, $arrayofrecords, $modellabel, $outputlangs, $diroutput, $template, dol_sanitizeFileName($outfile));
|
||||
} catch (Exception $e) {
|
||||
$mesg = $langs->trans('ErrorGeneratingBarcode');
|
||||
}
|
||||
$conf->global->TCPDF_THROW_ERRORS_INSTEAD_OF_DIE = $previousConf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ if (isModEnabled('mrp') && $user->hasRight('mrp', 'read') && !getDolGlobalString
|
||||
if (isModEnabled('project') && !getDolGlobalString('MAIN_SEARCHFORM_PROJECT_DISABLED') && $user->hasRight('projet', 'lire')) {
|
||||
$arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_project', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
if (isModEnabled('project') && !getDolGlobalString('MAIN_SEARCHFORM_TASK_DISABLED') && $user->hasRight('projet', 'lire')) {
|
||||
if (isModEnabled('project') && !getDolGlobalString('MAIN_SEARCHFORM_TASK_DISABLED') && !getDolGlobalString('PROJECT_HIDE_TASKS') && $user->hasRight('projet', 'lire')) {
|
||||
$arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_projecttask', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_projecttask', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
|
||||
@@ -930,14 +930,14 @@ class Notify
|
||||
// content will be sent.
|
||||
$mailTemplateLabel = isset($conf->global->{$notifcode.'_TEMPLATE'}) ? $conf->global->{$notifcode.'_TEMPLATE'} : '';
|
||||
$emailTemplate = null;
|
||||
// Set output language
|
||||
$outputlangs = $langs;
|
||||
if (!empty($mailTemplateLabel)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($this->db);
|
||||
$emailTemplate = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse);
|
||||
}
|
||||
if (!empty($mailTemplateLabel) && is_object($emailTemplate) && $emailTemplate->id > 0) {
|
||||
// Set output language
|
||||
$outputlangs = $langs;
|
||||
if ($obj->default_lang && $obj->default_lang != $langs->defaultlang) {
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang($obj->default_lang);
|
||||
|
||||
@@ -552,6 +552,7 @@ function project_admin_prepare_head()
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
|
||||
$head[$h][0] = DOL_URL_ROOT . '/projet/admin/project_task_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsProjectTask");
|
||||
$nbExtrafields = $extrafields->attributes['projet_task']['count'];
|
||||
@@ -560,6 +561,7 @@ function project_admin_prepare_head()
|
||||
}
|
||||
$head[$h][2] = 'attributes_task';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
|
||||
$langs->load("members");
|
||||
|
||||
@@ -887,13 +887,13 @@ Permission401=Read discounts
|
||||
Permission402=Create/modify discounts
|
||||
Permission403=Validate discounts
|
||||
Permission404=Delete discounts
|
||||
Permission430=Use Debug Bar
|
||||
Permission431=Use Debug Bar
|
||||
Permission511=Read salaries and payments (yours and subordinates)
|
||||
Permission512=Create/modify salaries and payments
|
||||
Permission514=Delete salaries and payments
|
||||
Permission517=Read salaries and payments everybody
|
||||
Permission519=Export salaries
|
||||
Permission520=Read Loans
|
||||
Permission521=Read Loans
|
||||
Permission522=Create/modify loans
|
||||
Permission524=Delete loans
|
||||
Permission525=Access loan calculator
|
||||
@@ -914,12 +914,12 @@ Permission609=Delete stickers
|
||||
Permission611=Read attributes of variants
|
||||
Permission612=Create/Update attributes of variants
|
||||
Permission613=Delete attributes of variants
|
||||
Permission650=Read Bills of Materials
|
||||
Permission651=Create/Update Bills of Materials
|
||||
Permission652=Delete Bills of Materials
|
||||
Permission660=Read Manufacturing Order (MO)
|
||||
Permission661=Create/Update Manufacturing Order (MO)
|
||||
Permission662=Delete Manufacturing Order (MO)
|
||||
Permission651=Read Bills of Materials
|
||||
Permission652=Create/Update Bills of Materials
|
||||
Permission653=Delete Bills of Materials
|
||||
Permission661=Read Manufacturing Order (MO)
|
||||
Permission662=Create/Update Manufacturing Order (MO)
|
||||
Permission663=Delete Manufacturing Order (MO)
|
||||
Permission701=Read donations
|
||||
Permission702=Create/modify donations
|
||||
Permission703=Delete donations
|
||||
@@ -991,7 +991,7 @@ Permission2515=Setup documents directories
|
||||
Permission2610=Generate/modify users API key
|
||||
Permission2801=Use FTP client in read mode (browse and download only)
|
||||
Permission2802=Use FTP client in write mode (delete or upload files)
|
||||
Permission3200=Read archived events and fingerprints
|
||||
Permission3201=Read archived events and fingerprints
|
||||
Permission3301=Generate new modules
|
||||
Permission4001=Read skill/job/position
|
||||
Permission4002=Create/modify skill/job/position
|
||||
@@ -1028,9 +1028,9 @@ Permission50152=Edit sales lines
|
||||
Permission50153=Edit ordered sales lines
|
||||
Permission50201=Read transactions
|
||||
Permission50202=Import transactions
|
||||
Permission50330=Read objects of Zapier
|
||||
Permission50331=Create/Update objects of Zapier
|
||||
Permission50332=Delete objects of Zapier
|
||||
Permission50331=Read objects of Zapier
|
||||
Permission50332=Create/Update objects of Zapier
|
||||
Permission50333=Delete objects of Zapier
|
||||
Permission50401=Bind products and invoices with accounting accounts
|
||||
Permission50411=Read operations in ledger
|
||||
Permission50412=Write/Edit operations in ledger
|
||||
@@ -1055,7 +1055,7 @@ Permission63002=Create/modify resources
|
||||
Permission63003=Delete resources
|
||||
Permission63004=Link resources to agenda events
|
||||
Permission64001=Allow direct printing
|
||||
Permission67000=Allow printing of receipts
|
||||
Permission67001=Allow printing of receipts
|
||||
Permission68001=Read intracomm report
|
||||
Permission68002=Create/modify intracomm report
|
||||
Permission68004=Delete intracomm report
|
||||
|
||||
@@ -322,6 +322,7 @@ ErrorFixThisHere=<a href="%s">Fix this here</a>
|
||||
ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Error: The URL of you current instance (%s) does not match the URL defined into your OAuth2 login setup (%s). Doing OAuth2 login in such a configuration is not allowed.
|
||||
ErrorMenuExistValue=A Menu already exist with this Title or URL
|
||||
ErrorSVGFilesNotAllowedAsLinksWithout=SVG files are not allowed as external links without the option %s
|
||||
ErrorGeneratingBarcode=Error while generating the barcode (probably invalid code shape)
|
||||
ErrorTypeMenu=Impossible to add another menu for the same module on the navbar, not handle yet
|
||||
ErrorObjectNotFound = The object <b>%s</b> is not found, please check your url
|
||||
ErrorCountryCodeMustBe2Char=Country code must be a 2 character string
|
||||
|
||||
@@ -322,6 +322,7 @@ ErrorFixThisHere= <a href="%s"> Corrigez ceci ici </a>
|
||||
ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Erreur : L'URL de votre instance actuelle (%s) ne correspond pas à l'URL définie dans votre configuration de connexion OAuth2 (%s). La connexion OAuth2 dans une telle configuration n'est pas autorisée.
|
||||
ErrorMenuExistValue=Un menu existe déjà avec ce titre ou cette URL
|
||||
ErrorSVGFilesNotAllowedAsLinksWithout=Les fichiers SVG ne sont pas autorisés en tant que liens externes sans l'option %s
|
||||
ErrorGeneratingBarcode=Erreur à la génération du code-barre (probablement une valeur invalide)
|
||||
ErrorTypeMenu=Impossible d'ajouter un autre menu pour le même module sur la barre de navigation, pas encore géré
|
||||
ErrorObjectNotFound = L'objet <b>%s</b> n'est pas trouvé, veuillez vérifier votre url
|
||||
ErrorCountryCodeMustBe2Char=Le code pays doit être une chaîne de 2 caractères
|
||||
|
||||
@@ -365,7 +365,7 @@ $sql .= ' FROM ' . MAIN_DB_PREFIX . 'product as p';
|
||||
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s ON p.rowid = s.fk_product';
|
||||
$sql .= ' AND s.fk_entrepot IN (' . $db->sanitize($list_warehouse) . ')';
|
||||
|
||||
$list_warehouse_selected = ($fk_entrepot < 0) ? '0' : $fk_entrepot;
|
||||
$list_warehouse_selected = ($fk_entrepot < 0 || empty($fk_entrepot)) ? '0' : $fk_entrepot;
|
||||
$sql .= ' AND s.fk_entrepot IN (' . $db->sanitize($list_warehouse_selected) . ')';
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user