feat(docs): update AGENTS.md with module generation guidelines and reset prompt template

This commit is contained in:
Janik von Rotz committed 2026-10-13 11:52:18 +02:00
1 parent 24973b9edc
commit 5b61e38d59
2 files changed
+36 -42

No files matched your search

+17 -1
View File
@@ -54,7 +54,23 @@ task install
Bootstrap a new module with the `task create-module` command.
To generate module code use `task generate-module-*` commands.
**Always use `task generate-module-*` commands when adding files to a module.**
These commands use project templates and ensure file names, records, and structure
are consistent with the codebase conventions.
Available generators:
- `generate-module-model` - add a new model
- `generate-module-inherit-model` - inherit an existing model
- `generate-module-views` - add model views
- `generate-module-inherit-view` - inherit an existing view
- `generate-module-security` - add security rules
- `generate-module-wizard` - add a wizard
- `generate-module-report` - add a report
- `generate-module-docs` - generate/update module README
- `generate-module-translation` - generate/update translations
Example:
```bash
task generate-module-views addons/project/project_sprint project.sprint
+19 -41
View File
@@ -1,14 +1,15 @@
---
title: "Check new Odoo 20.0 server options"
title: "Odoo 20.0 https interface param"
author: "Janik von Rotz <login@janikvonrotz.ch>"
state: completed
date_completed: 2026-10-06
model: moonshotai/Kimi-K2.6
input_tokens: 408885
output_tokens: 5875
state: draft
date_completed: YYYY-MM-DD
harness:
model:
input_tokens:
output_tokens:
---
# Check new Odoo 20.0 server options
# Odoo 20.0 https interface param
Note: @Clanker refers to the "ai agent" (you) who is working on this prompt file.
@@ -24,43 +25,20 @@ Note: @Clanker refers to the "ai agent" (you) who is working on this prompt file
## Task
There is Odoo Docker image in `images/odoo` that support configuring Odoo with env vars.
Currently I have `--http-interface=0.0.0.0` in my `compose.yml.template` to start Odoo 20.0.
There is now Odoo version 20.0 and I want to know if there are new server params.
Instead I would like to have this param as default in the image `images/odoo/entrypoint.sh`.
Report them in the worklog and I will decide if they should be supported with env vars.
If I understand correctly this param cannot be configured in `odoo.conf` or as an enviroment var. Double-check.
I want you to add a env var `HTTP_INTERACE` with `0.0.0.0` as default. Document this env var in `images/odoo/README.md`. Add before `PROXY_MODE`.
Then remove the param from the compose template.
I will build and test the image.
## Worklog
Compared `odoo/odoo/tools/config.py` between Odoo 19.0 and 20.0.
@Clanker Add a summary here once the task has been completed.
**New configuration options / env vars in Odoo 20.0:**
| Param | Env Var / CLI | Type / Default | Notes |
|---|---|---|---|
| `db_system` | `PGDATABASE_SYSTEM` | string, `postgres` | Database for shared system operations (bus, maintenance). |
| `gevent_workers` | `ODOO_GEVENT_WORKERS` | int, `1` | Number of gevent workers in prefork mode. Requires `SO_REUSEPORT`. |
| `unsafe_policy` | `ODOO_UNSAFE_POLICY` | choice, `log` | Policy when unsafe objects are detected during arbitrary code execution: `disable`, `log`, `raise`, `terminate`. |
| `max_http_threads` | `ODOO_MAX_HTTP_THREADS` | int, `2 * cpu_count + 1` | Read directly from env, not exposed in config file. |
| Colors | `ODOO_PY_COLORS`, `NO_COLOR`, `FORCE_COLOR` | bool | New `[colors]` config section (`pid`, `loglevel`, `session_id`, `http_request_line`, `http_response_body`, `perf`, `cursor_mode`, `sql`). |
**Notable behavioral change:**
- `http_interface` default changed from `0.0.0.0` to `127.0.0.1`. In a Docker container this means Odoo would only listen on localhost and be unreachable from the host/nginx unless explicitly overridden.
**Default change:**
- `DEFAULT_SERVER_WIDE_MODULES` now includes `rpc` (`['base', 'rpc', 'web']`).
None of the new params above are currently supported by `images/odoo/odoo.conf.template` or `images/odoo/bin/template-odoo-rc`.
**Implementation:**
Added support for the following env vars to the Odoo Docker image:
- `DB_SYSTEM` → `db_system` in `odoo.conf` (default: `postgres`)
- `GEVENT_WORKERS` → `gevent_workers` in `odoo.conf` (default: `1`)
- `ODOO_MAX_HTTP_THREADS` → exported directly to the environment when set (no config file entry; Odoo reads it via `os.getenv`)
Updated files:
- `images/odoo/odoo.conf.template`
- `images/odoo/bin/template-odoo-rc`
- `images/odoo/README.md`
@Clanker Set frontmatter state to completed and update date, harness and model. If you have access to session info also add token count.