Project Stage Guards
by Odoo DevHouse https://apps.odoo.com/apps/modules/browse?author=Odoo%20DevHouse$ 99.00
Project Stage Guards
Block a task from entering a stage - or being marked Done - until it's actually ready. No more empty deadlines reaching your "Done" column.
Standard Odoo Project lets any user drag any task into any stage regardless of readiness. Nothing stops a task with an empty deadline, no assignee, or open sub-tasks from being dropped straight into a closed stage.
- Half-done work reaches "Done" with no deadline and no one assigned
- Odoo's automated rules only react after the change is saved - they cannot cancel a move that should never have happened
- A parent task closes while its sub-tasks are still open
- In Odoo 19, closing a task is a status change - a user can mark it Done from the status widget without ever touching the Kanban stage
- Your Definition of Done depends entirely on everyone remembering the checklist
This module adds Stage Guards - configuration records that check a task before the change is saved. Name a target stage or status, pick a rule (required fields, all sub-tasks closed, or a custom domain), and a failing transition is rejected with a clear message - the Kanban card animates straight back to its original column.
- Three rule types: Required Fields, Sub-tasks Done, or a fully custom Domain
- Guard stage or status: in Odoo 19, "Done" is a status independent of the Kanban stage - guard either, or both
- Scoped by project and company: a global Definition of Done, or a different rule per project/company, in one database
- Every entry point covered: Kanban drag, form statusbar, list inline edit, mass edit, import, server actions, RPC
- Configurable, translatable messages that can mention the task name, stage, missing fields, or open sub-task count
- Multiple guards per stage: all must pass; every failure is listed, not just the first
- Batch-safe: one failing task in a bulk move rejects the whole write - nothing moves halfway
- Explicit, audited bypasses: a context key for migrations, a bypass group per guard, superuser - every bypass is logged
- Global kill switch: disable every guard instantly during an incident, without uninstalling anything
- Stage smart button: see how many guards protect a stage right from its own form
- Security roles: Project User (read guards) and Project Manager (configure guards)
- No core modifications: pure inheritance - compatible with Odoo 19 Community and Enterprise
Delivery & Agency Teams
No task closes without a deadline and an assignee - a clean, enforced Definition of Done for every client engagement.
Product Launches & Checklists
A parent task can't close while any descendant sub-task is still open - no launch item silently forgotten.
QA & Approval Workflows
Require a customer and a written summary before a task can reach "Approved" - a custom domain rule enforces it.
Multi-Project Consultancies
Different Definitions of Done per project, in one database - scope each guard to the projects it applies to.
Support & Helpdesk-Style Projects
Tickets can't be closed without a resolution note or a tag - required-field guards keep records complete.
Software & Sprint Teams
Guard the Done status directly, independent of Kanban stage - catch the exact case a stage-only rule would miss.
Create a Stage Guard
Go to Project -> Configuration -> Stage Guards -> New. Name it something clear, like "Definition of Done".
Choose What It Protects
Set Guard On to Stage, Status, or Both, then pick the target Kanban stage and/or task status the guard protects.
Pick the Rule
Choose Required Fields (e.g. Deadline, Assignees), Sub-tasks Done (with a closure basis and depth), or a Custom Domain for anything else.
Scope It and Write the Message
Restrict the guard to specific Projects and/or a Company, and optionally write a custom block message that can mention the task name and the missing fields.
Try It - and Watch It Get Enforced
Drag a non-compliant task into the guarded stage. The move is rejected with your message and the card returns to its column. Fix the task, try again, and it moves through cleanly.
Required Fields
Pick any fields on the task. All of them must be filled in. A value of zero still counts as filled - it's never treated as "missing".
Sub-tasks Done
A parent can't close while a sub-task is open. Choose closure by status or by Kanban column, and direct children or every descendant.
Custom Rule
Any filter condition on the task, built with Odoo's own filter builder. Checked when you save the guard, and never lets a task through if it ever breaks.
Step 1 - Stage Guards: Configuration List
Navigate to Project -> Configuration -> Stage Guards. Two guards protect the Done stage of the Website Redesign project: a Required Fields rule and a Sub-tasks Done rule.
Step 2 - Guard Form: "Definition of Done"
The guard form is organised into What It Protects, The Rule, Where It Applies, and Message. Here, Deadline and Assignees are required before a task can enter the Done stage of Website Redesign - with a custom block message using placeholders.
Step 3 - Task Stage Form: Guards Smart Button
Open any Kanban stage under Project -> Configuration -> Task Stages. A Guards smart button shows how many stage guards protect it - here, the Done stage is protected by 2 guards. Click through to see (and edit) them directly.
Step 4 - Kanban Board: Ready to Test
The Website Redesign Kanban board. "Homepage hero redesign" has no deadline or assignee, and "Launch Checklist" has an open sub-task (1/2). The folded Done column on the right is where the guards will fire.
Step 5 - Blocked: Required Fields Missing
Clicking Done on "Homepage hero redesign" is rejected before the write happens. The dialog reads exactly what was configured: "Homepage hero redesign cannot be closed: fill in Deadline, Assignees first." The task stays in Review.
Step 6 - Fixed and Moved to Done
After setting a Deadline and an Assignee, clicking Done again succeeds. The chatter on the right logs every change - including the stage transition itself - for a full audit trail.
Step 7 - Blocked: An Open Sub-task
"Launch Checklist" has a Sub-tasks smart button reading 1 / 2 (50%). Trying to close it is blocked: "Launch Checklist" cannot move to "Done". 1 open sub-task(s) must be closed first.
In Odoo 19, a task's Status (In Progress / Changes Requested / Approved / Done / Cancelled) is independent of its Kanban stage. A user can mark a task Done directly from the status widget on the form - without ever dragging its card. A guard that only watches the Kanban stage misses this entirely.
| Guard On | Fires When | Catches the Status Trap? |
|---|---|---|
| Stage | The Kanban stage changes to the target stage | No |
| Status | The task status changes to the target status | Yes |
| Both | Either the stage or the status changes | Yes - and never double-reports |
Project User
- Is gated by every guard that applies
- Can read guard configuration
- Cannot create, edit, or delete guards
Project Manager
- Full configuration access to Stage Guards
- Can be added to a guard's Bypass Groups
- Still gated unless explicitly bypassed
Explicit Bypasses
- A special bypass setting for migration scripts
- Per-guard Bypass Groups
- Real superuser (not a logged-in Administrator)
- Global kill switch via system parameter
Installation & Configuration
- Prerequisites: Odoo 19 with the Project app installed - Community or Enterprise, no extra dependency beyond Project and Discuss
- Install: Go to Apps -> Update App List -> Search "Project Stage Guards" -> Install
- Configure: Go to Project -> Configuration -> Stage Guards -> New
- Choose what it protects: a Kanban stage, a task status, or both
- Pick a rule: Required Fields, Sub-tasks Done, or a Custom Domain
- Scope it: restrict to specific projects and/or a company, and write your message
- Test: try moving a non-compliant task into the guarded stage - confirm it's rejected, then fix it and confirm it succeeds
Tip: Keep the module's "enabled" system setting in your back pocket - switching it off disables every guard instantly during an incident, without touching a single guard record.
Does a numeric field with a value of 0 count as "missing"?
No. Zero and False are legitimate values for numeric and boolean fields and are never treated as empty. Boolean fields are excluded from the Required Fields picker for the same reason.
Can a guard cancel a Kanban drag, not just report it afterwards?
Yes. Enforcement happens before the change is saved, not after - unlike Odoo's automated rules, which can only react once a change has already gone through. The Kanban card visibly reverts.
What happens if I import tasks directly into a guarded stage?
By default, imports are not blocked - a deliberate escape hatch for data migration, since imported records are created directly rather than moved into the stage. Enable the "check on create" system setting if you want new records checked too.
Can a logged-in Administrator skip the guards?
No. A logged-in Administrator is subject to guards like any other user, by design. Only the true system superuser, a listed Bypass Group member, or the special migration bypass setting can skip a guard - and every bypass is logged.
Does it modify any Odoo core models or existing data?
No. The module adds one new configuration screen and a single check on task changes - no fields added to existing task data, no data touched on install, and uninstalling leaves every task exactly as it was.
An Enforceable Definition of Done
Quality stops depending on every team member remembering the checklist - the system enforces it on every transition.
Nothing Slips Through the Status Widget
Guard the Done status directly - the one path a stage-only automation in Odoo 19 would completely miss.
Full Bypass Audit Trail
Every context-key, bypass-group, and superuser bypass is logged with the guard, task, and user - nothing happens silently.
Zero Cost When You Don't Need It
No active guards means one cached lookup and nothing else - install it once and turn on rules only where you need them.
Need Help or Have a Feature Request?
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Project (project) |
| Lines of code | 542 |
| Technical Name |
project_stage_guard |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Odoo%20DevHouse |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module