Preview a write with --dry-run¶
entries add and entries update accept --dry-run. It runs the same
checks as the real call and prints the entry that would be written. Nothing
is written.
$ odoo-work-cli entries add --project-id 1 --task-id 13 --date 2026-04-09 --hours 1:30 --description "Review fuzzy matching" --dry-run
Dry run: would create this entry; nothing was written.
Date: 2026-04-09
Project: Lighthouse Portal (1)
Task: Code review (13)
Hours: 1:30
Description: Review fuzzy matching
Warning: possible duplicate of entry 4018 (same day, project, task and description)
What it checks:
- the flags and values (hours, date);
- that project and task exist (an unknown ID gives the same error kind as the real call) and that the task belongs to the project;
- for
update: that the entry exists. The output is the entry with your changes merged in.
It also looks for duplicates: entries on the same day with the same project, task and description. The table output warns per duplicate.
As JSON¶
$ odoo-work-cli entries add --project-id 1 --task-id 13 --date 2026-04-09 --hours 1:30 --description "Review fuzzy matching" --dry-run --json
{
"id": null,
"date": "2026-04-09",
"project_id": 1,
"project": "Lighthouse Portal",
"task_id": 13,
"task": "Code review",
"description": "Review fuzzy matching",
"hours": 1.5,
"minutes": 90,
"employee": null,
"status": null,
"company": "Example Consulting",
"dry_run": true,
"duplicates": [
{
"id": 4018,
"date": "2026-04-09",
"project_id": 1,
"project": "Lighthouse Portal",
"task_id": 13,
"task": "Code review",
"description": "Review fuzzy matching",
"hours": 1.5,
"minutes": 90,
"employee": "Alex Demo",
"status": "draft",
"company": "Example Consulting"
}
]
}
The object is an entry plus "dry_run": true and duplicates ([] if
none). id is null for add. employee and status are only known once
Odoo stored the entry, so they are null for add. Schema:
entry_dry_run.schema.json, see JSON output.
Then book¶
Run the same command without --dry-run. Agents should show the dry run to
the user and wait for approval; see Use it from a coding agent.