erplibre/script
Mathieu Benoit 8cc5566743 [FIX] anonymisation : tirer les nombres dans l'étendue mesurée
`resource.calendar.attendance.hour_from` est un `float` qui porte une
HEURE DE LA JOURNÉE : un tirage uniforme sur 0 à 1000 le sort de 0..23 et
l'affichage de la fiche lève « ValueError: hour must be in 0..23 ». La
borne vit dans `time(int(integral), ...)` de resource/models/utils.py, et
aucune contrainte PostgreSQL ne la déclare : le schéma ne dit pas le SENS
de la donnée. « 0 à 1000 » est donc faux pour tout nombre borné par un
usage : heures, pourcentages, taux. On respecte désormais la seule borne
que les DONNÉES déclarent, leur propre étendue — min et max mesurés par
table, et 0 à 1000 quand elle est inconnue. Vérifié : les tirages tiennent
dans l'étendue mesurée, et la fiche s'affiche sans lever.

--- EN ---

`resource.calendar.attendance.hour_from` is a `float` holding an HOUR OF
DAY: a uniform draw over 0 to 1000 takes it out of 0..23 and displaying the
record raises "ValueError: hour must be in 0..23". The bound lives in
`time(int(integral), ...)` in resource/models/utils.py, and no PostgreSQL
constraint declares it: the schema does not say what the data MEANS. So "0
to 1000" is wrong for any number bounded by usage: hours, percentages,
rates. We now respect the only bound the DATA declares, its own range —
min and max measured per table, and 0 to 1000 when it is unknown. Checked:
draws stay inside the measured range, and the record displays without
raising.

Assisted-by: Claude Opus 5
(cherry picked from commit 8e0a19823714b1d18f05613d498f8136b682c047)
2026-08-29 02:11:04 -04:00
..
addons [ADD] script addons prod to dev support disable_payment_provider 2026-08-25 03:31:12 -04:00
analyse [FIX] anonymisation : tirer les nombres dans l'étendue mesurée 2026-08-29 02:11:04 -04:00
apache [ADD] apache configuration template 2025-10-31 01:31:21 -04:00
code [UPD] script Format 2026-03-14 23:26:31 -04:00
code_generator [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
config [ADD] mail: read and send email from the TODO CLI 2026-08-16 03:56:34 -04:00
database [FIX] database: de 12 à 15, neutraliser par le script plutôt que refuser 2026-08-29 02:11:04 -04:00
deployment [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
docker [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
execute [FIX] script: différer les annotations, la 12 tourne en Python 3.7 2026-08-23 03:13:58 -04:00
forgejo [FIX] security: the KeePass password leaves the command line too 2026-08-23 02:11:50 -04:00
fork_github_repo [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
git [ADD] git : un garde-fou commit-msg pour le sujet 2026-08-29 02:11:04 -04:00
ide [UPD] script Format 2026-03-14 23:26:31 -04:00
install [FIX] install : compiler pykcs11 avec SWIG 4.3 et au-delà 2026-08-23 02:11:50 -04:00
maintenance [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
manifest [FIX] manifest: give repo init a branch name, not a bare SHA 2026-08-10 03:10:50 -04:00
mobile [FIX] mobile: the bundle check refused a real build 2026-08-25 03:28:39 -04:00
nginx [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
odoo [ADD] run : précharger le registre Odoo au lancement, sans nuire 2026-08-29 02:11:04 -04:00
performance [ADD] script performance: use tool to test request per second on website 2025-11-01 01:09:32 -04:00
poetry [ADD] poetry: pin a dependency per architecture 2026-08-16 06:11:44 -04:00
postgresql/migration [UPD] script Format 2026-03-14 23:26:31 -04:00
process [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
proxmox [UPD] imbrication : le plan QEMU vise 24 Go au premier étage 2026-08-29 01:53:03 -04:00
qemu [ADD] qemu : déployer Proxmox VE (amd64, arm64) 2026-08-23 03:28:03 -04:00
restful [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
selenium [FIX] security: the KeePass password leaves the command line too 2026-08-23 02:11:50 -04:00
shell_script_odoo [ADD] brin_advisor brin_cluster 2026-08-07 02:52:33 -04:00
statistic [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
system [ADD] script system: search_docker_compose_erplibre.sh 2024-05-03 23:13:59 -04:00
systemd [FIX] systemd : lancer run.sh par bash, contre les echecs 203/EXEC 2026-08-23 02:11:50 -04:00
terminal [IMP] todo support odoo upgrade 2025-10-31 01:43:26 -04:00
test [ADD] git : un garde-fou commit-msg pour le sujet 2026-08-29 02:11:04 -04:00
todo [FIX] analyse: ne pas écrire de mots dans les champs qui portent des ids 2026-08-29 02:11:04 -04:00
version [REM] install: drop Ubuntu 20.04 and 22.04 2026-08-16 23:33:49 -04:00
__init__.py [IMP] Copy ERPLibre from https://github.com/mathbentech/InstallScript 2020-04-20 03:56:45 -04:00
generate_config.sh [FIX] generate_config: drop odoo_design-themes from the addons path 2026-08-07 02:09:40 -04:00
lib_asyncio.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
make.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
open_terminal_code_generator.sh [IMP] todo support odoo upgrade 2025-10-31 01:43:26 -04:00