Hibou Odoo Suite: Project Modules: HR Department Project

Purpose

This documentation outlines the processes associated with Hibou's HR Department Project module for Odoo 13, which allows you to define a default project for every department.

Getting Started

First thing's first, we want to install the module! Navigate to the Apps application.


Once there, removed the 'Apps" filter and search 'HR Department Project'. When ready, click Install .

Odoo CMS - a big picture

Good to Know!

This module requires the Employee Directory and Project applications. However, if you do not already have these applications installed, Odoo will install them for you during this module's installation!

Process

To get started, navigate to the Projects app.

Odoo - Sample 1 for three columns

Creating a Department Project

Once there, click  create .

This brings up a modal window where you'll complete the required fields. The fields you see will vary, depending on your database configuration.

Project Name: Enter a name for your project.

Choose a Project Email: Enter an prefix for this project's email address.

When ready, click Create.

Odoo CMS - a big picture

This brings you to the empty kanban view for your new project. Use the breadcrumbs to navigate back to the Projects overview page.


Find your new project card, click the ellipses menu, then click Edit.


On the full Project form view, you may now select a department for this project from the new Department dropdown menu. 
After all desired information has been entered, click Save .

Odoo CMS - a big picture

Accessing Department Projects

Navigate to the Employees app.

Odoo - Sample 1 for three columns

Once there, go to Configuration > Departments. Find the card for the Department you previously attached to a Project, click the  ellipses menu, then click Settings.


You will now see a new smart button with the number of projects associated with this department.

Click this button to continue to a kanban view of department-specific projects.

Odoo CMS - a big picture

Technical

This module adds a new Projects smart button to the HR Department form view that dynamically displays the number of projects for that department. The smart button leads to a new view for the corresponding department's projects. The `hr.department` model receives two new fields:

  • `project_ids` One2many field for all of the Projects for the department

  • `project_count` computed Integer field with the Project Count for the department

The `project.project` model receives a new `department_id` field that is used to designate that project to a specific department.

Additionally, there is a new filter to group projects by Department. This is a bridge module to allow other modules to use this behavior.