Commit graph

66 commits

Author SHA1 Message Date
c15d97f646 [FIX] selenium : rendre tkinter optionnel, il ne sert qu'au coffre
tkinter ne sert qu'au sélecteur de fichier du coffre, et seulement quand aucun
chemin KDBX n'est configuré. Importé en tête, il rendait tout le pilotage de
navigateur inimportable sur un Python bâti sans lui — donc sur tout serveur
sans paquet d'interface graphique.

Sans tkinter ni chemin configuré, get_kdbx journalise et rend None, comme le
fait déjà kdbx_manager. Vérifié : web_login.py --help sort en 0, et le chemin
dégradé appelé directement rend None.

--- EN ---

tkinter is only needed by the vault file picker, and only when no KDBX path is
configured. Imported at module level, it made the whole browser automation
unimportable on a Python built without it — that is, on any server with no
graphical toolkit package.

With no tkinter and no configured path, get_kdbx logs and returns None, as
kdbx_manager already does. Checked: web_login.py --help exits 0, and the
degraded path called directly returns None.

Assisted-by: Claude Opus 5
2026-09-14 05:10:46 -04:00
3f97b0a49c [FIX] security: the KeePass password leaves the command line too
Same exposure as the master password, same fix. kdbx_manager put the Odoo
password straight into the web_login command; /proc/<pid>/cmdline is
readable by every user on the machine, and no downstream filter reaches
that.

The command now carries the NAME of an environment variable, never the
value. One name per entry, because several credentials go out in a single
"parallel" call and a single variable could not tell them apart.
get_extra_command_user therefore returns (fragments, variables), and the
two call sites hand the variables to exec_command_live, which already
merged an environment.

Two things found on the way. web_login re-sent config.default_password_auth
when it retried after dismissing a modal, ignoring whatever the caller had
passed -- the retry silently fell back to "admin". And install_forgejo
printed the admin password back to the terminal, hence into the install log
and any CI capture; its own header already documents the default.

A test pins the guarantee: the fragment must not contain the password.

--- FR ---

Même exposition que pour le mot de passe maître, même correctif.
kdbx_manager mettait le mot de passe Odoo directement dans la commande
web_login ; /proc/<pid>/cmdline est lisible par tout utilisateur de la
machine, et aucun filtre en aval ne l'atteint.

La commande porte désormais le NOM d'une variable d'environnement, jamais
la valeur. Un nom par entrée, car plusieurs identifiants partent dans un
seul appel « parallel » et une variable unique ne saurait les distinguer.
get_extra_command_user rend donc (fragments, variables), et les deux
appelants confient les variables à exec_command_live, qui fusionnait déjà
un environnement.

Deux trouvailles en chemin. web_login renvoyait config.default_password_auth
à la reprise après une modale, ignorant ce que l'appelant avait fourni — la
reprise retombait en silence sur « admin ». Et install_forgejo réaffichait
le mot de passe administrateur, donc dans le journal d'installation et
toute capture de CI ; son propre en-tête documente déjà le défaut.

Un test verrouille la garantie : le fragment ne doit pas porter le secret.

Assisted-by: Claude Opus 5
2026-08-23 02:11:50 -04:00
f39b2e9451 [UPD] support: drop Ubuntu 20.04/22.04, add AlmaLinux and Rocky
Ubuntu 20.04 and 22.04 leave EVERY architecture, not just s390x. pikepdf
needs qpdf 12.2, whose build requires C++20, while focal ships GCC 9 and
publishes no g++-10 for s390x at all. Python 3.8, node 10, cargo 0.67 and
OpenSSL 1.1.1 each had a workaround; the pile of them did not. 18.04
follows, already off the lists. The refusal lands before any apt, this
script also serving existing machines.

AlmaLinux 9 and 10, Rocky 9 and 10 join the catalog on all four
architectures: the twelve "latest" URLs were opened, with no index to
parse unlike Fedora. They would have booted unreachable though -- the
cloud-config forced "groups: users, sudo", but the RHEL family has no
sudo group, only wheel, and an unknown group makes useradd fail, hence no
password and no key. The very trap already known for Debian, repeated
elsewhere. Host side, EPEL and CRB are enabled: without them most -devel
packages are missing, silently.

The server / graphical choice gains Cinnamon, the Linux Mint desktop,
from the distribution's own repositories. Mint's repository is set aside:
plain HTTP, and i386/amd64 only, which would rule out arm64 and s390x.
Along the way, dnf now installs an ENVIRONMENT rather than a group --
"gnome-desktop" brings gdm and gnome-shell but not base-x, hence no X
server.

--- FR ---

Ubuntu 20.04 et 22.04 partent de TOUTES les architectures, pas seulement
de s390x. pikepdf réclame qpdf 12.2, dont la compilation exige C++20,
quand focal livre GCC 9 et ne publie même pas de g++-10 pour s390x.
Python 3.8, node 10, cargo 0.67 et OpenSSL 1.1.1 avaient chacun leur
contournement ; leur accumulation, non. 18.04 suit, déjà hors des
listes. Le refus tombe avant tout apt, ce script servant aussi les
machines existantes.

AlmaLinux 9 et 10, Rocky 9 et 10 entrent au catalogue, sur les quatre
architectures : les douze URL « latest » ont été ouvertes, aucun index à
analyser contrairement à Fedora. Elles auraient pourtant démarré
inaccessibles — le cloud-config imposait « groups: users, sudo », or la
famille RHEL n'a pas de groupe sudo mais wheel, et un groupe inconnu fait
échouer useradd, donc ni mot de passe ni clé. C'est le piège déjà connu
pour Debian, reproduit ailleurs. Côté hôte, EPEL et CRB sont activés :
sans eux la plupart des -devel manquent, en silence.

Le choix serveur / graphique gagne Cinnamon, le bureau de Linux Mint,
depuis les dépôts de la distribution. Le dépôt de Mint lui-même est
écarté : il est en HTTP nu et ne publie que i386 et amd64, ce qui
exclurait arm64 et s390x. Au passage, dnf installe désormais un
ENVIRONNEMENT et non un groupe — « gnome-desktop » apporte gdm et
gnome-shell mais pas base-x, donc pas de serveur X.

Assisted-by: Claude Opus 5
2026-08-16 23:33:49 -04:00
751cdbbd29 [FIX] selenium: importer Optional (NameError sur l'annotation de type)
extraire_svg_graphique_by_3d annote « -> Optional[str] » mais le module
n'importait pas Optional -> « NameError: name 'Optional' is not defined »
au chargement. Ajout de « from typing import Optional ».

--- EN ---

extraire_svg_graphique_by_3d is annotated « -> Optional[str] » but the module
never imported Optional -> « NameError: name 'Optional' is not defined » at
import time. Added « from typing import Optional ».

Assisted-by: Claude Opus 4.8
2026-08-07 02:49:42 -04:00
cd65565943 [FIX] selenium: retirer -remote-allow-system-access (refusé par geckodriver récent)
webdriver.Firefox échouait : « InvalidArgumentException: Argument
--remote-allow-system-access can't be set via capabilities ». Cet argument
(ajouté pour le Firefox snap d'Ubuntu) est désormais REFUSÉ via les
capabilities par les geckodriver récents, qui gèrent seuls l'accès système
du snap. Il cassait donc TOUS les setups sur geckodriver récent (ici Arch
sans snap). On ne le passe plus.

--- EN ---

webdriver.Firefox was failing with « InvalidArgumentException: Argument
--remote-allow-system-access can't be set via capabilities ». That argument,
added for Ubuntu's snap Firefox, is now REFUSED through capabilities by
recent geckodriver versions, which handle the snap's system access on their
own. It therefore broke EVERY setup running a recent geckodriver — here Arch,
with no snap at all. It is no longer passed.

Assisted-by: Claude Opus 4.8
2026-08-07 02:49:25 -04:00
6e4cae594b [UPD] script selenium lib: improve diagnostic file download 2026-08-07 02:32:19 -04:00
f8dbfb5487 [UPD] script selenium lib: refresh can wait finish loading 2026-08-07 02:32:15 -04:00
6562db7bb8 [FIX] selenium cancel exit when need humain navigation 2026-08-07 02:32:11 -04:00
c2d42fcc06 [UPD] selenium: update path driver 2026-08-07 02:32:07 -04:00
e46b6612c7 [UPD] script selenium update darkreader-firefox.xpi 2026-08-07 02:32:03 -04:00
de954a146b [FIX] selenium lib: can change default_timeout and change multi-click 2026-08-07 02:31:59 -04:00
4c799aebc3 [IMP] script selenium lib get elements and multiple click 2026-08-07 02:31:50 -04:00
ac4925fd26 [FIX] script selenium support new firefox version 2026-08-07 02:31:45 -04:00
d83cbee234 [UPD] selenium support detection error 2026-08-07 02:31:38 -04:00
281ecd322d [UPD] selenium lib support convertir_svg_en_png_via_selenium 2026-08-07 02:31:34 -04:00
d3512caeac [FIX] selenium lib: get_element wait_clickable return 1 element 2026-08-07 02:31:28 -04:00
596315e41a [IMP] script selenium lib: support download file for network hub
- downloading file and share information with =data=
- default directory is /tmp and not home download seluser
2026-08-07 02:31:24 -04:00
1e731114f5 [IMP] script: update copyright year to 2026
Reflect the current year in all TechnoLibre
license headers across script/, test/, and docker/.

Generated by Claude Code 2.1.74 model claude-sonnet-4-6

Co-Authored-By: Mathieu Benoit <mathben@technolibre.ca>
2026-03-11 23:16:05 -04:00
3d80d1df75 [UPD] erplibre pip requirement missing tldextract and PyYAML
- Update selenium and comment about it
2026-03-08 18:59:00 -04:00
a2d3aa2a78 [ADD] Multilingual translation of all documentation (EN/FR)
Added 30 .base.md files using the mmg (Multilingual Markdown Generator)
format to automatically generate English (.md) and French (.fr.md)
versions of all project documentation.
Updated conf/make.documentation.Makefile to process all .base.md files
via `make doc_markdown`.
2026-03-04 22:23:52 -05:00
Manel Guechetouli
8c3a3fb4c1 [FIX] in selenium_lib firefox snap path 2026-02-12 00:16:42 -05:00
273763a4fb [FIX] script selenium: support snap firefox for Ubuntu 2026-02-05 12:26:29 -05:00
11d2547d8f [UPD] script selenium: force sleep before activate dark mode 2026-02-05 02:07:47 -05:00
b193a2ccb1 [FIX] script selenium: increase timeout to 60 seconds when get element 2026-02-04 09:09:07 -05:00
665bc9284d [IMP] script selenium lib: wait_is_invisible with get_element 2025-12-20 03:15:51 -05:00
f09a1252e2 [UPD] script selenium: dashboard use odoo_website_menu_click 2025-12-20 03:15:51 -05:00
07a149bde4 [IMP] script selenium lib: support specific directory for selenium grid
- fix algorithm scrollto_element, center it, not scroll if already in
view if not too low
2025-12-02 00:34:46 -05:00
e15f4f3f85 [UPD] selenium: disable enable_tour in same time of dark mode 2025-11-22 00:04:30 -05:00
018b651243 [IMP] selenium web login enable dark mode into Odoo 2025-11-11 06:27:35 -05:00
41fbc39c21 [FIX] script config: support merge dict configuration between 3 config
- fix upgrade when missing log
2025-11-11 00:07:17 -05:00
c1b9a5fee4 [UPD] format and update license 2025-11-08 23:53:07 -05:00
5277fc1a81 [IMP] selenium devops: generate code example 01 2025-11-08 23:53:07 -05:00
c19ca7a554 [FIX] selenium video: firefox windows size 2025-11-08 23:53:07 -05:00
d7d14123bf [FIX] selenium error git rebase 2025-10-31 17:29:01 -04:00
3d6b340b6d [UPD] script selenium better tools to navigate into Odoo
- support external selenium service to support selenium from Odoo
instance
- move selenium installation to erplibre virtual environment
- support user test instead of admin
2025-10-31 01:45:52 -04:00
de9779cfc2 [IMP] refactoring .venv.erplibre
- erplibre separate venv erplibre and odoo
- rename python-version to python-odoo-version
- add conf/python-erplibre-version
- rename .venv to .venv.erplibre
- move .venv/repo to .venv.erplibre/bin/repo
- install pyenv into .venv.erplibre
- install poetry into .venv.odooVERSION

- first installation show odoo version to install
- can install erplibre without odoo
- update README.md information about installation with TODO
- change image from github to locally
- remove link creation .venv

- update version: remove code to force create symbolic link .venv
- use dynamic merge manifest, will be able to merge different odoo
version
- can add dev tools
- default manifest is empty to remove conflict
2025-10-31 01:34:26 -04:00
a1b9c98b5f [IMP] refactoring to support multiple version of Odoo
- change path odoo to support multiple
- conf pycharm exclude folder
- refactor run/test/coverage by use same script
2025-10-31 01:32:11 -04:00
467bcdfedf [FIX] script selenium: show screencast directory only when create video 2025-10-31 01:32:02 -04:00
d27e366d97 [FIX] selenium: improve login odoo, need to wait for odoo 18 2025-10-31 01:31:57 -04:00
5ab5642de5 [IMP] script selenium accept private execution
- erplibre private repertory for user private configuration
- move todo_override to private/todo.json
- selenium moving script
2025-08-07 03:31:49 -04:00
05e93b19d9 [UPD] selenium lib support headless and get_text_from_element 2025-06-15 23:45:35 -04:00
1890768be9 [IMP] script selenium lib: support open kdbx and download files 2025-06-02 18:59:47 -04:00
ea16502fad [FIX] script selenium: firefox addon enable to run in private 2025-04-30 15:34:01 -04:00
27565351d8 [UPD] script selenium: show robot message and hide it
- record video in directory screencasts
- support conversion webm to mp4
- reduice framerate by defaut, for a better recording, because too much
image
2025-04-29 02:21:50 -04:00
9b94ad49de [IMP] script selenium: refresh and switch tab feature 2025-04-28 06:13:12 -04:00
1ef0663752 [FIX] script selenium: update odoo_version and create dir screenshots 2025-04-28 00:35:33 -04:00
1b7d5ed60d [IMP] script selenium: feature to take screenshot 2025-04-13 02:25:31 -04:00
2f564501ac [UPD] script selenium: inject robot with msg and better support odoo16 menu 2025-04-13 02:25:31 -04:00
771599dfc8 [UPD] script selenium: support web form save 2025-04-12 17:16:14 -04:00
27145f4b86 [UPD] script selenium: support datetimepicker into input_text_with_mouse_move
- helping method to fill fields
2025-04-12 17:16:05 -04:00