From 2bbb215da2f661e9da047ecdcb14c1a6c811d107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 19 Mar 2025 14:49:39 +0100 Subject: [PATCH 1/6] update fontawesome icon for mastodon (#33515) Co-authored-by: Laurent Destailleur --- htdocs/install/mysql/data/llx_c_socialnetworks.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_socialnetworks.sql b/htdocs/install/mysql/data/llx_c_socialnetworks.sql index 37db11acb96..d6ff39aae89 100644 --- a/htdocs/install/mysql/data/llx_c_socialnetworks.sql +++ b/htdocs/install/mysql/data/llx_c_socialnetworks.sql @@ -1,7 +1,7 @@ --- Copyright (C) 2024 Laurent Destailleur --- Copyright (C) 2024 Frédéric France --- Copyright (C) 2024 Udo Tamm --- Copyright (C) 2024 Regis Houssin +-- Copyright (C) 2024 Laurent Destailleur +-- Copyright (C) 2024-2025 Frédéric France +-- Copyright (C) 2024 Udo Tamm +-- Copyright (C) 2024 Regis Houssin -- -- License @@ -38,7 +38,7 @@ INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES (__ENTITY__, 'github', 'GitHub', 'https://www.github.com/{socialid}', '', 0); INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES (__ENTITY__, 'instagram', 'Instagram', 'https://www.instagram.com/{socialid}', 'fa-instagram', 1); INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES (__ENTITY__, 'linkedin', 'LinkedIn', 'https://www.linkedin.com/in/{socialid}', 'fa-linkedin', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES (__ENTITY__, 'mastodon', 'Mastodon', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES (__ENTITY__, 'mastodon', 'Mastodon', '{socialid}', 'fa-mastodon', 0); INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES (__ENTITY__, 'meetup', 'Meetup', '{socialid}', 'fa-meetup', 0); INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES (__ENTITY__, 'periscope', 'Periscope', '{socialid}', '', 0); INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES (__ENTITY__, 'pinterest', 'Pinterest', '{socialid}', 'fa-pinterest', 0); From e804098a4d602b68ecf6e67b4096ac4e647d5428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 19 Mar 2025 14:50:19 +0100 Subject: [PATCH 2/6] add missing translations (#33492) * add missing translations * add missing translations * add missing translations * add missing translations * add missing translations --- dev/translation/ignore_translation_keys.lst | 7 ------- htdocs/adherents/class/adherent.class.php | 6 +++--- htdocs/adherents/list.php | 4 ++-- htdocs/langs/en_US/bills.lang | 1 + htdocs/public/partnership/new.php | 4 ++-- htdocs/public/project/suggestbooth.php | 4 ++-- htdocs/public/project/suggestconference.php | 4 ++-- htdocs/public/ticket/create_ticket.php | 4 ++-- 8 files changed, 14 insertions(+), 20 deletions(-) diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index 38a06ce1550..01af43499ed 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -1005,7 +1005,6 @@ INVOICE_USE_RETAINED_WARRANTY INVOICE_USE_SITUATION INVOICE_USE_SITUATION_CREDIT_NOTE ImpossibleToContactAuthority -InputValueIsNotAnNumber InterDate Inventory Code InvoiceReplace @@ -1067,7 +1066,6 @@ ReceptionValidated Recruited Ref. Product RefNewContract -Societe Stable Suggested TicketMessageMailSignatureText @@ -1087,14 +1085,9 @@ Vat VirtualHost WEBPORTAL_ROOT_URL WEBPORTAL_USER_LOGGED2 -XSubsriptionError -email -id multicurrency_buyPriceInCurrency multicurrency_modifyRateApplication -ref smsing -societe target titre type diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 3a71bde4cb0..8103d632add 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2009-2017 Regis Houssin * Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Marcos García - * Copyright (C) 2015-2024 Frédéric France + * Copyright (C) 2015-2025 Frédéric France * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2018-2019 Thibault FOUCART @@ -546,8 +546,8 @@ class Adherent extends CommonObject if ($this->civility_id) { $infos .= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel()."\n"; } - $infos .= $langs->transnoentities("id").": ".$this->id."\n"; - $infos .= $langs->transnoentities("ref").": ".$this->ref."\n"; + $infos .= $langs->transnoentities("Id").": ".$this->id."\n"; + $infos .= $langs->transnoentities("Ref").": ".$this->ref."\n"; $infos .= $langs->transnoentities("Lastname").": ".$this->lastname."\n"; $infos .= $langs->transnoentities("Firstname").": ".$this->firstname."\n"; $infos .= $langs->transnoentities("Company").": ".$this->company."\n"; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 8b419ef384b..73db430b0c4 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -5,7 +5,7 @@ * Copyright (C) 2013-2015 Raphaël Doursenaud * Copyright (C) 2014-2016 Juanjo Menent * Copyright (C) 2018-2024 Alexandre Spangaro - * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2021-2025 Frédéric France * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Benjamin Falière * Copyright (C) 2024 Alexandre Spangaro @@ -381,7 +381,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("XSubsriptionCreated", $nbcreated), null, 'mesgs'); $db->commit(); } else { - setEventMessages($langs->trans("XSubsriptionError", $error), null, 'mesgs'); + setEventMessages($langs->trans("XSubsriptionErrors", $error), null, 'mesgs'); $db->rollback(); } } diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index cc4e1bd9894..555c77bcc5c 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -682,4 +682,5 @@ PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress CumulativeProgression=Cumulative progress INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. +InputValueIsNotAnNumber=Input value is not a number LimitDepositInvoicePossibilityForConsistency=Limit deposit invoice type to keep consistencies between lines (from proposals or orders) diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php index b84fc790aa8..65dfd5a8c07 100644 --- a/htdocs/public/partnership/new.php +++ b/htdocs/public/partnership/new.php @@ -4,7 +4,7 @@ * Copyright (C) 2006-2013 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 J. Fernando Lagrange - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2018 Alexandre Spangaro * Copyright (C) 2021 Waël Almoman * Copyright (C) 2024-2025 MDW @@ -204,7 +204,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he } if (!GETPOST('societe')) { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("societe"))."
\n"; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty"))."
\n"; } if (!GETPOST('lastname')) { $error++; diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 6e57db70241..85e51301266 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -232,7 +232,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he } if (!GETPOST("societe")) { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n"; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty"))."
\n"; } if (!GETPOST("label")) { $error++; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 26f4be49abd..97288e9959b 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -233,7 +233,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he } if (!GETPOST("societe")) { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n"; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty"))."
\n"; } if (!GETPOST("label")) { $error++; diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 1f04dca7251..3a6aa903b5f 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -3,7 +3,7 @@ * Copyright (C) 2016 Christophe Battarel * Copyright (C) 2023 Laurent Destailleur * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -237,7 +237,7 @@ if (empty($reshook)) { // Check email address if (!empty($origin_email) && !isValidEmail($origin_email)) { $error++; - array_push($object->errors, $langs->trans("ErrorBadEmailAddress", $langs->transnoentities("email"))); + array_push($object->errors, $langs->trans("ErrorBadEmailAddress", $langs->transnoentities("Email"))); $action = ''; } From c9804cf6bef7d7d32f23bd2c05bc4d35497a16d2 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 19 Mar 2025 14:50:44 +0100 Subject: [PATCH 3/6] Qual: Update codespell to 2.4.1 + fix spelling (#33493) # Qual: Update codespell to 2.4.1 + fix spelling Update codespell version in pre-commit configuration, fix new codespell notices --- .pre-commit-config.yaml | 2 +- htdocs/langs/en_US/accountancy.lang | 2 +- htdocs/langs/en_US/admin.lang | 2 +- htdocs/langs/en_US/uxdocumentation.lang | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b26721ab58d..ee3bb6f8407 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -201,7 +201,7 @@ repos: # Execute codespell to fix typo errors (setup of codespell into dev/tools/codespell/) - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell # Due to a current limitation of configuration files, diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 1f3a81ab06d..9c0e964bba8 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -310,7 +310,7 @@ ChangeBinding=Change the binding Accounted=Accounted in ledger NotYetAccounted=Not yet transferred to accounting ShowTutorial=Show Tutorial -ClickOnUseTutorialForHelp=Welcome on the section to generate your accountancy. Click on the link "%s" to get advices on how to use it. +ClickOnUseTutorialForHelp=Welcome on the section to generate your accountancy. Click on the link "%s" to get advice on how to use it. NotReconciled=Not reconciled WarningRecordWithoutSubledgerAreExcluded=Warning, all lines without subledger account defined are filtered and excluded from this view AccountRemovedFromCurrentChartOfAccount=Accounting account that does not exist in the current chart of accounts diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 0be7b59397a..33330d8f58d 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2641,7 +2641,7 @@ communityRepo=Community repository online=Online NotConnected=Not connected HTTPHeaderEditor=This page allows you to edit security related HTTP headers -ReservedToAdvancedUsers=It is reserverd for advanced users +ReservedToAdvancedUsers=It is reserved for advanced users HTTPHeader=HTTP Header itemFound=%s Items found SearchStringMinLength=Search string must be at least 2 characters diff --git a/htdocs/langs/en_US/uxdocumentation.lang b/htdocs/langs/en_US/uxdocumentation.lang index 7ef95f45527..076da6873dd 100644 --- a/htdocs/langs/en_US/uxdocumentation.lang +++ b/htdocs/langs/en_US/uxdocumentation.lang @@ -1,11 +1,11 @@ BackToDolibarr=Go back to Dolibarr -WelcomeToDocumentation=Welcome to UI Documentation. This section is under developpement, +WelcomeToDocumentation=Welcome to UI Documentation. This section is under development, DocumentationHome=UI Documentation DocBasicUsage=Basic usage # Components DocComponentsTitle=Components -DocComponentsMainDescription=Components section description is under developpment +DocComponentsMainDescription=Components section description is under development # Badges DocBadgeTitle=Badges @@ -97,5 +97,5 @@ DocSelectInputsDescription = Select input to enter one value DocMultiSelectInputsDescription = Multiselect input to enter several values DocEditorInputsDescription = Editor input to enter text with HTML DocDateSelectInputsDescription = Date input to enter a date with or without hours -DocInputsMainDescription = Documentation and exemples for inputs +DocInputsMainDescription = Documentation and examples for inputs DocInputsTitle = Inputs From acd82fcc4bb51afa98d16649a5108662d636eb84 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 19 Mar 2025 14:51:07 +0100 Subject: [PATCH 4/6] Update tool versions in .pre-commit-config (#33494) * Update tool versions in .pre-commit-config # Update tool versions in .pre-commit-config Update tool versions for pre-commit. codespell is updated in #33493 . Prettier was upgraded to 3.1.0 - higher versions are not compatible with the normal pre-commit workflow apparently. * Ignore notice from sqlfluff Ignore LT14 - The 'WHERE' keyword should always start a new line. --- .pre-commit-config.yaml | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ee3bb6f8407..cf752e4abb2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.(?!github/workflows)[^/]*/.*))$ repos: # Several miscellaneous checks and fix (on yaml files, end of files fix) - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: # This hook tests the name of the branch and return an error if the name is # 'develop' or an official version 'x.y' @@ -60,13 +60,13 @@ repos: # Gitleaks is a SAST tool for detecting and preventing hardcoded secrets like passwords, api keys, and tokens in git repos - repo: https://github.com/gitleaks/gitleaks.git - rev: v8.16.1 + rev: v8.24.0 hooks: - id: gitleaks # Check github actions - repo: https://github.com/rhysd/actionlint - rev: v1.7.3 + rev: v1.7.7 hooks: - id: actionlint @@ -168,7 +168,7 @@ repos: # Prettier (format code, only for non common files) - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.3 + rev: v3.1.0 hooks: - id: prettier stages: [manual] @@ -191,7 +191,7 @@ repos: # Check format of yaml files - repo: https://github.com/adrienverge/yamllint.git - rev: v1.35.1 + rev: v1.36.2 hooks: - id: yamllint args: @@ -251,7 +251,7 @@ repos: # Check sql file syntax - repo: https://github.com/sqlfluff/sqlfluff - rev: 3.1.0 + rev: 3.3.1 hooks: - id: sqlfluff-lint stages: [pre-commit, manual] # manual needed for ci diff --git a/pyproject.toml b/pyproject.toml index 419d1d6d5f1..ba1e562e155 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ processes = -1 #verbose = 1 #exclude_rules = "LT01,CP01,RF04" # RF04 | Keywords should not be used as identifiers. (rowid, login, position, ...) -exclude_rules = "LT01,LT02,LT05,LT12,LT13,CP01,CP02,CP04,CP05,RF04" +exclude_rules = "LT01,LT02,LT05,LT12,LT13,LT14,CP01,CP02,CP04,CP05,RF04" dialect = "mysql" # Default byte limit is 20000, must set limit - some files are too big. large_file_skip_byte_limit = 100000 From ce138c1b3e3e828a8723155a57deca8721d782bd Mon Sep 17 00:00:00 2001 From: kkhelifa-opendsi Date: Wed, 19 Mar 2025 14:52:43 +0100 Subject: [PATCH 5/6] FIX: Always show message if accountancy hidden options are activated to help to resolve some problems (#33512) --- htdocs/accountancy/admin/index.php | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 0c422f24fc6..d5a7609fcf8 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -361,22 +361,20 @@ print load_fiche_titre($title, $linkback, 'accountancy'); // Show message if accountancy hidden options are activated to help to resolve some problems -if (!$user->admin) { - if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) { - print '
' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '
'; - } - if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) { - print '
' . $langs->trans("ConstantIsOn", "FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS") . '
'; - } - if (getDolGlobalString('ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY')) { - print '
' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '
'; - } - if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { - print '
' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '
'; - } - if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { - print '
' . $langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED") . '
'; - } +if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) { + print '
' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '
'; +} +if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) { + print '
' . $langs->trans("ConstantIsOn", "FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS") . '
'; +} +if (getDolGlobalString('ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY')) { + print '
' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '
'; +} +if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { + print '
' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '
'; +} +if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { + print '
' . $langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED") . '
'; } print '
'; From 935d93266eac43a9a2bc4e21f6ff002246b0793d Mon Sep 17 00:00:00 2001 From: kkhelifa-opendsi Date: Wed, 19 Mar 2025 14:57:31 +0100 Subject: [PATCH 6/6] FIX: Fix download shared document when for exemple the thirdparty is shared and we create the thirdpaty on entity 1 but generate and share a document from entity 2 (#33507) --- htdocs/document.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/document.php b/htdocs/document.php index 2fe6bf8fe8d..10731ca5fda 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -201,6 +201,12 @@ if (!empty($hashp)) { $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir } $entity = $ecmfile->entity; + if (isModEnabled('multicompany') && !empty($ecmfile->src_object_type) && $ecmfile->src_object_id > 0) { + $object = fetchObjectByElement($ecmfile->src_object_id, $ecmfile->src_object_type); + if (is_object($object) && $object->id > 0) { + $entity = $object->entity; + } + } if ($entity != $conf->entity) { $conf->entity = $entity; $conf->setValues($db);