erplibre/CLAUDE.md

57 lines
2.6 KiB
Markdown
Raw Normal View History

2026-03-17 04:00:55 -04:00
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## ERPLibre Multi-Version Odoo Platform
2026-02-15 13:58:08 -05:00
## Projet
ERPLibre est un fork communautaire d'Odoo Community Edition (OCE) supportant les versions 12 à 18.
Version actuelle : **1.6.0** | Licence : **AGPL-3.0+**
Version Odoo par défaut : **18.0** (support officiel ERPLibre 1.6.0)
## Points d'attention pour Claude
- Toujours vérifier la version Odoo active avant de modifier du code (`cat .odoo-version`)
- Les addons sont dans `addons/` et gérés par Google Repo — ne pas modifier la structure des dépôts
[REF] claude: trim the always-loaded guidance, and fix what it got wrong Every session paid ~4 000 tokens for CLAUDE.md and .claude/rules/, and part of that content no longer described this repository: CLAUDE.md and 05-environments.md gave .venv.odoo18/bin/python — a path that does not exist. The real one carries BOTH versions, .venv.odoo18.0_python3.12.10. 02-project-structure.md announced addons/ and odoo12.0/, absent from the checkout. That is the reason for the cuts, more than the token count: the files drifted from the repository, while « ls » cannot. What a session can rebuild by reading the code is now left to the code. 02-project-structure.md deleted — a tree that ls gives, and gives right 05-environments.md deleted — a venv list that was simply false 04-code-conventions.md reduced to a pointer at .flake8, .editorconfig and pyproject.toml, which already hold every value it repeated, plus the Git conventions, which they do not 01-versions.md table dropped for the pointer at conf/supported_version_erplibre.json, whose keys already pair Odoo with Python Two blocks move to lazy loading — their body costs nothing until invoked: 03-commands.md -> skill erplibre-commands (kept whole: there is no « make help » target, and the per-module test recipes carry flags nobody would guess) 07-documentation.md -> skill erplibre-doc-i18n for the how-to, while the prohibition « never edit a generated .md » STAYS in the rules: a rule that must hold at all times cannot live in a file loaded on demand Resident guidance: ~3 997 -> ~1 939 est. tokens per session. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-02 03:16:36 -04:00
- Utiliser le venv approprié pour le code Odoo. Son nom porte les DEUX versions
(`.venv.odoo18.0_python3.12.10/bin/python`) : le retrouver par
`ls -d .venv.odoo*` plutôt que de le composer de tête
2026-02-15 13:58:08 -05:00
- Les scripts ERPLibre utilisent `.venv.erplibre/bin/python`
[REF] claude: trim the always-loaded guidance, and fix what it got wrong Every session paid ~4 000 tokens for CLAUDE.md and .claude/rules/, and part of that content no longer described this repository: CLAUDE.md and 05-environments.md gave .venv.odoo18/bin/python — a path that does not exist. The real one carries BOTH versions, .venv.odoo18.0_python3.12.10. 02-project-structure.md announced addons/ and odoo12.0/, absent from the checkout. That is the reason for the cuts, more than the token count: the files drifted from the repository, while « ls » cannot. What a session can rebuild by reading the code is now left to the code. 02-project-structure.md deleted — a tree that ls gives, and gives right 05-environments.md deleted — a venv list that was simply false 04-code-conventions.md reduced to a pointer at .flake8, .editorconfig and pyproject.toml, which already hold every value it repeated, plus the Git conventions, which they do not 01-versions.md table dropped for the pointer at conf/supported_version_erplibre.json, whose keys already pair Odoo with Python Two blocks move to lazy loading — their body costs nothing until invoked: 03-commands.md -> skill erplibre-commands (kept whole: there is no « make help » target, and the per-module test recipes carry flags nobody would guess) 07-documentation.md -> skill erplibre-doc-i18n for the how-to, while the prohibition « never edit a generated .md » STAYS in the rules: a rule that must hold at all times cannot live in a file loaded on demand Resident guidance: ~3 997 -> ~1 939 est. tokens per session. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-02 03:16:36 -04:00
- Le Makefile principal inclut des fragments depuis `conf/make.*.Makefile`
2026-02-15 13:58:08 -05:00
- Les fichiers privés vont dans `private/` (non versionné)
- La DB PostgreSQL par défaut est sur le port 5432, mot de passe admin : `admin`
- Port Odoo par défaut : 8069, longpolling : 8072
- Pour les commits : suivre le format `[TYPE] description` (ex: `[FIX]`, `[UPD]`, `[ADD]`, `[REM]`)
- Pour la documentation : modifier les `.base.md`, jamais les `.md` ou `.fr.md` directement
- Outil mmg disponible via `source .venv.erplibre/bin/activate && mmg`
2026-03-07 02:30:59 -05:00
## Core Principles
- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
## Règles détaillées
Les instructions détaillées sont dans `.claude/rules/` :
| Fichier | Contenu |
|---------|---------|
[REF] claude: trim the always-loaded guidance, and fix what it got wrong Every session paid ~4 000 tokens for CLAUDE.md and .claude/rules/, and part of that content no longer described this repository: CLAUDE.md and 05-environments.md gave .venv.odoo18/bin/python — a path that does not exist. The real one carries BOTH versions, .venv.odoo18.0_python3.12.10. 02-project-structure.md announced addons/ and odoo12.0/, absent from the checkout. That is the reason for the cuts, more than the token count: the files drifted from the repository, while « ls » cannot. What a session can rebuild by reading the code is now left to the code. 02-project-structure.md deleted — a tree that ls gives, and gives right 05-environments.md deleted — a venv list that was simply false 04-code-conventions.md reduced to a pointer at .flake8, .editorconfig and pyproject.toml, which already hold every value it repeated, plus the Git conventions, which they do not 01-versions.md table dropped for the pointer at conf/supported_version_erplibre.json, whose keys already pair Odoo with Python Two blocks move to lazy loading — their body costs nothing until invoked: 03-commands.md -> skill erplibre-commands (kept whole: there is no « make help » target, and the per-module test recipes carry flags nobody would guess) 07-documentation.md -> skill erplibre-doc-i18n for the how-to, while the prohibition « never edit a generated .md » STAYS in the rules: a rule that must hold at all times cannot live in a file loaded on demand Resident guidance: ~3 997 -> ~1 939 est. tokens per session. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-02 03:16:36 -04:00
| `01-versions.md` | Versions Odoo supportées, où lit-on la correspondance |
| `04-code-conventions.md` | Où sont les configs de format, conventions Git |
| `06-code-generator.md` | Génération de modules Odoo |
[REF] claude: trim the always-loaded guidance, and fix what it got wrong Every session paid ~4 000 tokens for CLAUDE.md and .claude/rules/, and part of that content no longer described this repository: CLAUDE.md and 05-environments.md gave .venv.odoo18/bin/python — a path that does not exist. The real one carries BOTH versions, .venv.odoo18.0_python3.12.10. 02-project-structure.md announced addons/ and odoo12.0/, absent from the checkout. That is the reason for the cuts, more than the token count: the files drifted from the repository, while « ls » cannot. What a session can rebuild by reading the code is now left to the code. 02-project-structure.md deleted — a tree that ls gives, and gives right 05-environments.md deleted — a venv list that was simply false 04-code-conventions.md reduced to a pointer at .flake8, .editorconfig and pyproject.toml, which already hold every value it repeated, plus the Git conventions, which they do not 01-versions.md table dropped for the pointer at conf/supported_version_erplibre.json, whose keys already pair Odoo with Python Two blocks move to lazy loading — their body costs nothing until invoked: 03-commands.md -> skill erplibre-commands (kept whole: there is no « make help » target, and the per-module test recipes carry flags nobody would guess) 07-documentation.md -> skill erplibre-doc-i18n for the how-to, while the prohibition « never edit a generated .md » STAYS in the rules: a rule that must hold at all times cannot live in a file loaded on demand Resident guidance: ~3 997 -> ~1 939 est. tokens per session. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-02 03:16:36 -04:00
| `07-documentation.md` | Interdit : ne pas éditer les `.md` générés |
| `08-deployment.md` | Docker, systemd, nginx, SSL, DNS |
| `09-workflow.md` | Workflow orchestration + task management |
[REF] claude: trim the always-loaded guidance, and fix what it got wrong Every session paid ~4 000 tokens for CLAUDE.md and .claude/rules/, and part of that content no longer described this repository: CLAUDE.md and 05-environments.md gave .venv.odoo18/bin/python — a path that does not exist. The real one carries BOTH versions, .venv.odoo18.0_python3.12.10. 02-project-structure.md announced addons/ and odoo12.0/, absent from the checkout. That is the reason for the cuts, more than the token count: the files drifted from the repository, while « ls » cannot. What a session can rebuild by reading the code is now left to the code. 02-project-structure.md deleted — a tree that ls gives, and gives right 05-environments.md deleted — a venv list that was simply false 04-code-conventions.md reduced to a pointer at .flake8, .editorconfig and pyproject.toml, which already hold every value it repeated, plus the Git conventions, which they do not 01-versions.md table dropped for the pointer at conf/supported_version_erplibre.json, whose keys already pair Odoo with Python Two blocks move to lazy loading — their body costs nothing until invoked: 03-commands.md -> skill erplibre-commands (kept whole: there is no « make help » target, and the per-module test recipes carry flags nobody would guess) 07-documentation.md -> skill erplibre-doc-i18n for the how-to, while the prohibition « never edit a generated .md » STAYS in the rules: a rule that must hold at all times cannot live in a file loaded on demand Resident guidance: ~3 997 -> ~1 939 est. tokens per session. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-02 03:16:36 -04:00
Chargées à la demande (`.claude/skills/`) :
| Skill | Contenu |
|-------|---------|
| `erplibre-commands` | Commandes make et scripts : versions, run, tests, DB, Docker, repo |
| `erplibre-doc-i18n` | Mode d'emploi mmg (`.base.md`) et i18n du CLI TODO |
L'arborescence et la liste des venvs ne sont plus documentées : `ls` et
`ls -d .venv.*` en donnent l'état réel, la doc dérivait de la réalité.