Skip to content

aykutsp/odoo-planning-task-selection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odoo Planning Task Selection

Odoo 18 Python Module License Status

Task-level scheduling for Odoo 18 Planning. This module adds Project Task selection to Planning shifts, Planning shift templates, and recurring Planning records, making it easier to connect capacity planning with real project work.

Overview

Odoo Planning is excellent for allocating people and time, while Odoo Project is where task-level execution is usually tracked. This add-on connects the two by adding a Task field to Planning records and enforcing consistency between the selected project and selected task.

The result is a cleaner planning workflow: planners can schedule work at the task level, report by task, and open the related project task directly from the Planning interface.

Features

  • Adds task_id to planning.slot.
  • Adds task_id to planning.slot.template.
  • Adds task_id to planning.recurrency.
  • Filters selectable tasks by the selected project.
  • Automatically fills the project when a task is selected first.
  • Prevents selecting a task from a different project.
  • Prevents closed tasks from being selected.
  • Restricts Planning project selection to configured project stages.
  • Injects Task into available Planning views after installation or module update.
  • Adds Planning search filters for records with and without a task.
  • Adds Task as a Planning group-by option.
  • Adds a dedicated Planning Analysis by Task reporting action when the target reporting menu is available.
  • Shows Task in Planning Gantt popovers as [ID] Task Name.
  • Opens the related Project Task form from the Planning Gantt task link.

Supported Views

The module dynamically extends supported Planning views where safe anchors are available:

  • Form
  • List / Tree
  • Search
  • Gantt
  • Calendar
  • Pivot
  • Graph
  • Kanban

Dynamic view generation is intentional. Odoo Enterprise Planning view XML IDs and inherited view layers can vary between minor releases, editions, Studio customizations, and customer databases. Instead of depending on a single XML ID, the module scans available Planning views and creates targeted inherited views only where the expected structure exists.

Project And Task Rules

Project selection is limited to projects whose stage is in this configured set:

[1, 12, 7, 8, 10, 11]

The Task selector is limited to:

  • tasks under the selected project
  • tasks whose project is in one of the allowed project stages
  • tasks where is_closed = False

The same consistency rules are enforced at model constraint level, so invalid project and task combinations are blocked even if data is written outside the standard UI.

Installation

  1. Copy the planning_slot_task folder into your custom Odoo addons path.
  2. Restart the Odoo service.
  3. Update the Apps list.
  4. Install Planning Task Selection.

Command-line example:

./odoo-bin -d DATABASE \
  --addons-path=/path/to/odoo/addons,/path/to/custom/addons \
  -i planning_slot_task \
  --stop-after-init

Updating

The module rebuilds its dynamic Planning view extensions during module update:

./odoo-bin -d DATABASE \
  --addons-path=/path/to/odoo/addons,/path/to/custom/addons \
  -u planning_slot_task \
  --stop-after-init

During rebuild, the module removes its own generated views and recreates them from the current Planning view structure.

Dependencies

  • planning
  • project

Compatibility Notes

This module targets Odoo 18.0. It is designed for environments where Planning views may differ because of Enterprise updates, inherited custom views, or Odoo Studio changes.

The module includes a narrow cleanup for stale Studio position="move" customizations that referenced duplicate project_id fields from earlier versions. It only deactivates those specific broken view customizations and does not delete business records.

If a heavily customized Planning view does not expose a suitable anchor, the field still exists on the model and can be manually added to that view through Developer Mode or Studio.

Repository Layout

planning_slot_task/
|-- data/
|-- hooks/
|-- models/
|-- scripts/
|-- static/
|   `-- description/
|-- __init__.py
|-- __manifest__.py
`-- README.md

License

This project is licensed under LGPL-3, matching the license declared in the Odoo module manifest.

About

Task-level scheduling for Odoo 18 Planning

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors