Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions project_task_stage_change_restriction/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
=====================================
Project Task Stage Change Restriction
=====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:70428b68fa49a42f600173b5497b2a3cab2b78eca3ac7ce36d711878aa841f88
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github
:target: https://github.com/OCA/project/tree/18.0/project_task_stage_change_restriction
:alt: OCA/project
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/project-18-0/project-18-0-project_task_stage_change_restriction
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows specifying which users or groups can move a task to a
specific stage.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

There may be cases where you want to prevent certain users from moving a
task into specific stages. For example, developers can move tasks to the
"Review" stage, but only a project manager can move a task to the "Done"
or "Cancel" stages.

Configuration
=============

The **Task Stages** menu is only visible when Odoo is in developer mode.
Please turn on developer mode before proceeding.

Go to "Project > Configuration > Task Stages" and select or create a new
task stage. Configure the following fields in the "Stage Change
Restriction" group:

- **Assigned Only**
If enabled, only users assigned to the task can move it into this
stage.
- **Project Manager**
If enabled, only the manager of the project this task belongs to can
move it.
- **Group Members**
Select groups whose members can move tasks into this stage.

Please be advised, that selected conditions are evaluated using the "OR"
principle. So, a user should satisfy any of the selected conditions.

NB: restrictions are not applied if a stage is being changed by a
superuser.

Usage
=====

| Try to move a task to a restricted stage. If your user doesn't satisfy
the stage-allowance conditions, the following access error will be
raised:
| "Sorry, you are not allowed to move the task '<task_name>' into the
stage '<stage_name>'."

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/project/issues/new?body=module:%20project_task_stage_change_restriction%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Cetmix

Contributors
------------

Cetmix <cetmix.com> Ivan Sokolov Andrei Loukachov

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/project <https://github.com/OCA/project/tree/18.0/project_task_stage_change_restriction>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions project_task_stage_change_restriction/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2025 Cetmix OÜ
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
21 changes: 21 additions & 0 deletions project_task_stage_change_restriction/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2025 Cetmix OÜ
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Project Task Stage Change Restriction",
"summary": "Restrict project task stage",
"version": "18.0.1.0.0",
"category": "Project",
"author": "Odoo Community Association (OCA), Cetmix",
"license": "AGPL-3",
"website": "https://github.com/OCA/project",
"depends": ["project"],
"data": [
"views/project_task_stage_views.xml",
],
"demo": [
"data/demo_project_task_stage.xml",
],
"installable": True,
"application": False,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Stages -->
<record id="demo_stage_free" model="project.task.type">
<field name="name">Free</field>
<field name="sequence">5</field>
</record>
<record id="demo_stage_assigned_only" model="project.task.type">
<field name="name">Assigned Only</field>
<field name="sequence">10</field>
<field name="allow_assigned_only">1</field>
</record>
<record id="demo_stage_pm_only" model="project.task.type">
<field name="name">Project Manager Only</field>
<field name="sequence">15</field>
<field name="allow_project_manager">1</field>
</record>
<record id="demo_stage_group_only" model="project.task.type">
<field name="name">Project Users Only</field>
<field name="sequence">20</field>
<field
name="allow_group_ids"
eval="[(6, 0, [ref('project.group_project_user')])]"
/>
</record>
<!-- Project -->
<record id="demo_project_restricted" model="project.project">
<field name="name">Restricted Demo Project</field>
<field name="user_id" ref="base.user_admin" />
<field
name="type_ids"
eval="[(6, 0, [
ref('project_task_stage_change_restriction.demo_stage_free'),
ref('project_task_stage_change_restriction.demo_stage_assigned_only'),
ref('project_task_stage_change_restriction.demo_stage_pm_only'),
ref('project_task_stage_change_restriction.demo_stage_group_only')
])]"
/>
</record>
<!-- Tasks -->
<record id="demo_task_dev" model="project.task">
<field name="name">Dev Task</field>
<field name="project_id" ref="demo_project_restricted" />
<field name="user_ids" eval="[(6, 0, [ref('base.user_demo')])]" />
<field name="stage_id" ref="demo_stage_free" />
</record>
<record id="demo_task_pm" model="project.task">
<field name="name">PM Task</field>
<field name="project_id" ref="demo_project_restricted" />
<field name="user_ids" eval="[(6, 0, [ref('base.user_admin')])]" />
<field name="stage_id" ref="demo_stage_free" />
</record>
</odoo>
Empty file.
129 changes: 129 additions & 0 deletions project_task_stage_change_restriction/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_stage_change_restriction
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-07-28 09:25+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.4\n"

#. module: project_task_stage_change_restriction
#: model:ir.model.fields,field_description:project_task_stage_change_restriction.field_project_task_type__allow_assigned_only
#: model:project.task.type,name:project_task_stage_change_restriction.demo_stage_assigned_only
msgid "Assigned Only"
msgstr "Solo assegnati"

#. module: project_task_stage_change_restriction
#: model:project.task.type,legend_blocked:project_task_stage_change_restriction.demo_stage_assigned_only
#: model:project.task.type,legend_blocked:project_task_stage_change_restriction.demo_stage_free
#: model:project.task.type,legend_blocked:project_task_stage_change_restriction.demo_stage_group_only
#: model:project.task.type,legend_blocked:project_task_stage_change_restriction.demo_stage_pm_only
msgid "Blocked"
msgstr "Bloccato"

#. module: project_task_stage_change_restriction
#: model:project.task.type,name:project_task_stage_change_restriction.demo_stage_free
msgid "Free"
msgstr "Libero"

#. module: project_task_stage_change_restriction
#: model:ir.model.fields,field_description:project_task_stage_change_restriction.field_project_task_type__allow_group_ids
msgid "Group Members"
msgstr "Membri del gruppo"

#. module: project_task_stage_change_restriction
#: model_terms:ir.ui.view,arch_db:project_task_stage_change_restriction.view_project_task_type_form_restriction
msgid "If enabled, only the project manager can move tasks into this stage."
msgstr ""
"Se abilitata, solo il responsabile del progetto può spostare i lavori tra le "
"fasi."

#. module: project_task_stage_change_restriction
#: model_terms:ir.ui.view,arch_db:project_task_stage_change_restriction.view_project_task_type_form_restriction
msgid ""
"If enabled, only users assigned to the task can move it into this stage."
msgstr ""
"Se abilitata, solo gli utenti assegnati al lavoro possono spostarlo in "
"questa fase."

#. module: project_task_stage_change_restriction
#: model:project.task.type,legend_normal:project_task_stage_change_restriction.demo_stage_assigned_only
#: model:project.task.type,legend_normal:project_task_stage_change_restriction.demo_stage_free
#: model:project.task.type,legend_normal:project_task_stage_change_restriction.demo_stage_group_only
#: model:project.task.type,legend_normal:project_task_stage_change_restriction.demo_stage_pm_only
msgid "In Progress"
msgstr "In lavoro"

#. module: project_task_stage_change_restriction
#: model_terms:ir.ui.view,arch_db:project_task_stage_change_restriction.view_project_task_type_form_restriction
msgid "Members of selected groups can move tasks into this stage."
msgstr ""
"I membri dei gruppi selezionati possono spostare i lavori in questa fase."

#. module: project_task_stage_change_restriction
#: model:ir.model.fields,field_description:project_task_stage_change_restriction.field_project_task_type__allow_project_manager
msgid "Project Manager"
msgstr "Responsabile progetto"

#. module: project_task_stage_change_restriction
#: model:project.task.type,name:project_task_stage_change_restriction.demo_stage_pm_only
msgid "Project Manager Only"
msgstr "Solo responsabile progetto"

#. module: project_task_stage_change_restriction
#: model:project.task.type,name:project_task_stage_change_restriction.demo_stage_group_only
msgid "Project Users Only"
msgstr "Solo utenti progetto"

#. module: project_task_stage_change_restriction
#: model:project.task.type,legend_done:project_task_stage_change_restriction.demo_stage_assigned_only
#: model:project.task.type,legend_done:project_task_stage_change_restriction.demo_stage_free
#: model:project.task.type,legend_done:project_task_stage_change_restriction.demo_stage_group_only
#: model:project.task.type,legend_done:project_task_stage_change_restriction.demo_stage_pm_only
msgid "Ready"
msgstr "Pronto"

#. module: project_task_stage_change_restriction
#: model:project.project,name:project_task_stage_change_restriction.demo_project_restricted
msgid "Restricted Demo Project"
msgstr "Progetto demo limitato"

#. module: project_task_stage_change_restriction
#. odoo-python
#: code:addons/project_task_stage_change_restriction/models/project_task.py:0
#, python-format
msgid ""
"Sorry, you are not allowed to move the task '%(task)s' into the stage "
"'%(stage)s'."
msgstr ""
"Non si è abilitati allo spostamento del lavoro '%(task)s' alla fase "
"'%(stage)s'."

#. module: project_task_stage_change_restriction
#: model_terms:ir.ui.view,arch_db:project_task_stage_change_restriction.view_project_task_type_form_restriction
msgid "Stage Change Restriction"
msgstr "Limitazione modifica fase"

#. module: project_task_stage_change_restriction
#: model:ir.model,name:project_task_stage_change_restriction.model_project_task
msgid "Task"
msgstr "Lavoro"

#. module: project_task_stage_change_restriction
#: model:ir.model,name:project_task_stage_change_restriction.model_project_task_type
msgid "Task Stage"
msgstr "Fase lavoro"

#. module: project_task_stage_change_restriction
#: model:project.project,label_tasks:project_task_stage_change_restriction.demo_project_restricted
msgid "Tasks"
msgstr "Lavori"
Loading