Commit graph

34 commits

Author SHA1 Message Date
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
Laurent Destailleur
b0f07a1578 Fix bad template for tms timestamp in sql files. 2026-04-07 21:40:57 +02:00
Laurent Destailleur
578a1ef568 Clean files 2026-01-07 19:01:54 +01:00
Anthony Berton
311c194a5b
FIX - Template sql modulebuilder (#33703)
Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-03 15:59:30 +02:00
MDW
b0087aaf61
Qual: Enable phan on modulebuilder (#30652)
* Allow null for buyer, and force '' for  in printObjectLine(s)

* Allow null for Contact in show_actions_done

* Qual: Enable phan on modulebuilder

# Qual: Enable phan on modulebuilder

Most files of the modulebuilder template can be checked as regular files.
It will help improve the template

* Update baseline (enable modulebuilder notices)

* Add properties that are expected to exist on modules_boxes

* Qual: Ignore false positive (phan)

* Set phpdoc type to include null on formAddObjectLine

* Qual: Fixes for modulebuilder (phan, phpstan, bugs, format)

* Fix phpcs for intracom

* Make ModeleBoxes:showBox() signature match child class's

* Fix *box::showBox() phpdoc types

* Update index.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-18 18:16:08 +02:00
Laurent Destailleur
4d10fe3bba Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-29 15:48:50 +01:00
Laurent Destailleur
0a345e37a0 Fix delete not used table 2024-02-27 13:01:42 +01:00
Aloïs Micard
9c27b76d55 Fix index name 2024-01-18 15:35:08 +01:00
Aloïs Micard
d89d1ede98 FIX: ModuleBuilder: make sure fk_object is unique on extrafields 2024-01-18 15:21:35 +01:00
Laurent Destailleur
cbf0c314d3 Doc 2023-08-12 13:49:01 +02:00
Anthony Berton
a6f6b906bb NEW - Add action trigger in modulebuilder template 2023-05-24 12:39:15 +02:00
Laurent Destailleur
88f1ae9c13 NEW A module can embed a sql script run at each Dolibarr upgrade 2022-02-23 12:55:15 +01:00
Laurent Destailleur
8a62d97b89 Remove one thousand of useless files 2021-04-12 15:57:16 +02:00
UT from dolibit
2f349146ed
Create index.html 2021-04-07 19:44:39 +02:00
Laurent Destailleur
8f34f4c1c5 FIX #14530 2020-08-27 21:46:28 +02:00
Laurent Destailleur
87ff94fc64 Add generic fields 2020-04-05 03:59:23 +02:00
Laurent Destailleur
4a734e53a6 Fix column too low.
Fix automatic event not found if from a module with several objects
2019-12-17 14:47:58 +01:00
Alexandre SPANGARO
02dbc11f98 Move Gnu.org to https 2019-09-23 21:55:30 +02:00
Laurent Destailleur
55334dff3b FIX management of extrafields in modulebuilder 2019-08-28 13:04:22 +02:00
Norbert Penel / OSCSS
f569785e85 fix modulebuilder
tms mustn't have a not null
2019-05-18 00:39:31 +02:00
Laurent Destailleur
7a45527983 Generate the foreign key into key.sql file 2018-03-27 23:26:20 +02:00
Laurent Destailleur
9458c80c48 Work on reminders 2017-10-31 23:10:29 +01:00
Laurent Destailleur
64107b7625 Include module name in generated sql files 2017-10-29 18:53:08 +01:00
Laurent Destailleur
66d2c29fe1 Work on modulebuilder and website module 2017-10-26 01:02:13 +02:00
Laurent Destailleur
0c066b471d Debug modulebuilder 2017-09-05 22:33:55 +02:00
Laurent Destailleur
18468e3f18 Debug modulebuilder 2017-08-05 11:45:54 +02:00
Laurent Destailleur
dcb79e66cc Debug modulebuilder 2017-07-24 13:55:12 +02:00
Laurent Destailleur
2a133f4a3f Generate table for extrafields 2017-07-22 20:12:00 +02:00
Laurent Destailleur
11cc1f04c4 Work on modulebuilder 2017-07-12 01:55:07 +02:00
Laurent Destailleur
8db4e91888 Debug modulebuilder 2017-07-08 15:43:36 +02:00
Laurent Destailleur
22fabe5a3a Copyright in modulebuilder 2017-06-27 20:14:48 +02:00
Laurent Destailleur
a6f3eabf4d example of FK definition 2017-06-21 19:26:36 +02:00
Laurent Destailleur
c651f1da45 Work on modulebuilder tool 2017-05-27 19:05:36 +02:00
Laurent Destailleur
dd71fdc82f Work on modulebuilder template 2017-05-08 21:00:23 +02:00