dolibarr/htdocs/modulebuilder/template
VIAL-GOUTEYRON Quentin e837854094
NEW: ModuleBuilder - consistent status labels and explicit trigger naming (#38883)
* NEW : Derive ModuleBuilder status labels from arrayofkeyval

LibStatut() in the ModuleBuilder object template hardcoded the
Draft/Enabled/Disabled labels, which diverged from the labels defined
in the 'status' field arrayofkeyval used by the list filter and the
select. Build labelStatus/labelStatusShort from arrayofkeyval so the
badge, the filter and the select all show the same configurable labels.

Add ModuleBuilderTemplateConventionsTest covering the derivation.

Next: normalize trigger codes to MYMODULE_MYOBJECT_ACTION in class line 637 + typo line 50, sql/data.sql lines 27/30-32, myobject_card.php line 378; extend the test with trigger assertions.

* NEW : Use explicit MODULE_OBJECT_ACTION trigger naming in template

The ModuleBuilder object template emitted the validate trigger as the
generic MYOBJECT_VALIDATE, inconsistent with the MYMODULE_MYOBJECT
prefix already advertised by $TRIGGER_PREFIX and used by the
unvalidate/cancel/reopen/sentbymail trigger codes. Normalize the
validate trigger, the seed data.sql agenda triggers and the close
notification example to the MYMODULE_MYOBJECT_<ACTION> policy so
generated modules expose clear, non-ambiguous trigger codes. Also fix a
typo in the $TRIGGER_PREFIX comment.

Extend ModuleBuilderTemplateConventionsTest with trigger naming checks.

Next: ChangeLog entry covering both features, then dolibarr-audit + functional verification, then push to remote quentin and run pr-review-v2.

* DOC : Add ChangeLog entries for ModuleBuilder status labels and triggers

Next: dolibarr-audit on both features, then functional verification, then push to remote quentin and run pr-review-v2.

* FIX : Guard ModuleBuilder LibStatut against undefined status key

Hardening from audit: when LibStatut() is called with a status value
that is not present in the 'status' field arrayofkeyval, reading
labelStatus/labelStatusShort raised an undefined-array-key warning under
PHP 8. Default both labels to an empty string, which dolGetStatus
already accepts, so the badge degrades gracefully to the status code.

Next: push branch to remote quentin and run dolibarr-pr-review-v2 on the full diff vs develop.

* CHORE Drop the files CONTRIBUTING forbids to edit in a PR [skip-claudemd]

ChangeLog is generated from the commit messages at release time, and the
language files other than en_US are synced from Transifex.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: Alexandre SPANGARO <aspangaro.dolibarr@gmail.com>
2026-08-17 21:41:18 +02:00
..
.tx
admin Qual: Fix 'SqlInjection' notices (#39225) 2026-07-20 02:52:07 +02:00
ajax Clean code 2026-01-13 23:25:12 +01:00
build Doc 2026-07-30 11:20:44 +02:00
class NEW: ModuleBuilder - consistent status labels and explicit trigger naming (#38883) 2026-08-17 21:41:18 +02:00
core Qual: Fix 'SqlInjection' notices (#39232) 2026-08-01 23:54:52 +02:00
css Removed conf $dolibarr_nocache that is useless (CTRL+F5 is enough) 2026-04-25 12:13:25 +02:00
doc Clean files 2026-01-07 19:01:54 +01:00
img Clean files 2026-01-07 19:01:54 +01:00
js Removed conf $dolibarr_nocache that is useless (CTRL+F5 is enough) 2026-04-25 12:13:25 +02:00
langs/en_US
lib NEW: ModuleBuilder - selectable object tabs (+ fixes for multi-object generation) (#38570) 2026-06-09 19:04:00 +02:00
scripts exit code must be >= 0 (#35311) 2025-09-12 02:29:23 +02:00
sql NEW: ModuleBuilder - consistent status labels and explicit trigger naming (#38883) 2026-08-17 21:41:18 +02:00
stats clean code (#38265) 2026-05-18 02:43:24 +02:00
test/phpunit
.editorconfig fix modulebuilder editorconfig (#35221) 2025-09-04 14:27:23 +02:00
.gitattributes Clean files 2026-01-07 19:01:54 +01:00
.gitignore
AGENTS.md Doc 2026-04-22 02:58:57 +02:00
ChangeLog.md
COPYING
modulebuilder.txt Clean files 2026-01-07 19:01:54 +01:00
mymoduleindex.php Fix option to set max short list 2026-07-04 13:33:17 +02:00
myobject_agenda.php Revert "/imports/index.php wrongly shows access refused (#39379)" (#39386) 2026-08-04 22:23:57 +02:00
myobject_card.php NEW: ModuleBuilder - consistent status labels and explicit trigger naming (#38883) 2026-08-17 21:41:18 +02:00
myobject_contact.php Fix path traversal with $_SERVER["CONTEXT_DOCUMENT_ROOT"] variable for new modulebuilder modules 2025-12-09 13:36:20 +01:00
myobject_document.php Fix path traversal with $_SERVER["CONTEXT_DOCUMENT_ROOT"] variable for new modulebuilder modules 2025-12-09 13:36:20 +01:00
myobject_list.php Qual: Fix 'SqlInjection' notices (#39216) 2026-07-23 19:06:39 +02:00
myobject_note.php Add custom tpl to note (#38437) 2026-05-26 16:02:36 +02:00
README.md

MYMODULE FOR DOLIBARR ERP & CRM

Features

Description of the module...

Other external modules are available on Dolistore.com.

Translations

Translations can be completed manually by editing files in the module directories under langs.

Installation

Prerequisites: You must have Dolibarr ERP & CRM software installed. You can download it from Dolistore.org. You can also get a ready-to-use instance in the cloud from https://saas.dolibarr.org

From the ZIP file and GUI interface

If the module is a ready-to-deploy zip file, so with a name module_xxx-version.zip (e.g., when downloading it from a marketplace like Dolistore), go to menu Home> Setup> Modules> Deploy external module and upload the zip file.

Final steps

Using your browser:

  • Log into Dolibarr as a super-administrator
  • Go to "Setup"> "Modules"
  • You should now be able to find and enable the module

Licenses

Main code

GPLv3 or (at your option) any later version. See file COPYING for more information.

Documentation

All texts and readme's are licensed under GFDL.