Skip to content

[20.0][MIG] project_hr: Migration to 20.0 - #1896

Open
AyushPatel2021 wants to merge 57 commits into
OCA:20.0from
AyushPatel2021:20.0-mig-project_hr
Open

AyushPatel2021 wants to merge 57 commits into
OCA:20.0from
AyushPatel2021:20.0-mig-project_hr

Conversation

@AyushPatel2021

Copy link
Copy Markdown
  • The task kanban card is now its own view (project.view_task_card), so the assignee domain field is added there.
  • The computed domains become Json fields: a 20.0 Binary field only takes BinaryValue. Json stores an empty list as False, which the web client cannot parse, so the category domain defaults to Domain.TRUE.
  • Tests run as a project manager and HR officer (20.0 BaseCommon runs tests as a test user, not as superuser), who also gets company B for the multi-company test. The portal collaborator gets "edit" access (20.0 collaborators default to "view"), and the regular-user test reads the linked employees with sudo (20.0 x2many fields only return readable records).

Note: a project user without HR rights now sees "Linked employees" empty on the task, because 20.0 x2many fields only return records the user can read (odoo/odoo@3d20ab40d3f5). The stored value is unchanged.

Assisted-by: Claude Opus 5.5

pedrobaeza and others added 30 commits November 24, 2026 17:33
Project HR
==========

This is a technical module for adding some HR information to projects and
provide technical fields with HR information:

- Employee categories at project and task level.
- Employee linked to the user assigned to a task.
- Employee categories at user level.

These fields can be used later for extra features like task scheduling or
security restrictions.

It also provides some facilities on project management:

* Limit selection of assigned users according selected employee category at
  task level.
* Limit selection of employee categories at task level depending on the
  selected categories at project level. All are shown if no categories at
  project level.

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

For setting employee categories at project level:

1. Go to *Project > Dashboard*.
2. Click on the 3 vertical dots for unfolding options and select "Settings".
3. Put the wanted employee categories on the field "Employee Categories".

For setting employee categories:

1. Go to *Project > Search > Tasks*.
2. Select or create a new task.
3. Put the wanted employee categories on the field "Employee categories".
4. If there's already some employee categories selected at project level, those
   will be the only selectable ones in the task.

Usage
=====

1. Go to *Project > Search > Tasks*.
2. If there's an employee category selected in the task, you will only be able
   to select those users whose employee belongs to that category.

Known issues / Roadmap
======================

* Limit project and task visibility according employee categories through
  overriding security methods (as through record rules is not possible without
  modifying existing ones).
Currently translated at 100.0% (16 of 16 strings)

Translation: project-12.0/project-12.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-12-0/project-12-0-project_hr/de/
Currently translated at 100.0% (16 of 16 strings)

Translation: project-12.0/project-12.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-12-0/project-12-0-project_hr/sl/
Translated using Weblate (Croatian)

Currently translated at 31.2% (5 of 16 strings)

Translation: project-12.0/project-12.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-12-0/project-12-0-project_hr/hr/
[ADD] project_hr runbot

Update project_hr/__manifest__.py

Co-Authored-By: Saran @ Ecosoft <saranl@ecosoft.co.th>

[FIX] pre-commit errors
Currently translated at 100.0% (16 of 16 strings)

Translation: project-13.0/project-13.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_hr/es/
Currently translated at 100.0% (16 of 16 strings)

Translation: project-13.0/project-13.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_hr/ca/
[UPD] Update project_hr.pot

[UPD] README.rst
Translated using Weblate (Italian)

Currently translated at 52.6% (10 of 19 strings)

Translation: project-14.0/project-14.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_hr/it/
TT43237

[UPD] Update project_hr.pot

[UPD] README.rst

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-16.0/project-16.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_hr/
Currently translated at 100.0% (16 of 16 strings)

Translation: project-16.0/project-16.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_hr/it/
Currently translated at 100.0% (16 of 16 strings)

Translation: project-16.0/project-16.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_hr/de/

[UPD] README.rst
Currently translated at 100.0% (16 of 16 strings)

Translation: project-16.0/project-16.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_hr/es/
Translated using Weblate (Dutch)

Currently translated at 93.7% (15 of 16 strings)

Translation: project-16.0/project-16.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_hr/nl/
Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (16 of 16 strings)

Translation: project-16.0/project-16.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_hr/pt_BR/
[BOT] post-merge updates
oca-ci and others added 25 commits November 24, 2026 17:33
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-19.0/project-19.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_hr/
Currently translated at 100.0% (18 of 18 strings)

Translation: project-19.0/project-19.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_hr/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-19.0/project-19.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_hr/
Currently translated at 100.0% (19 of 19 strings)

Translation: project-19.0/project-19.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_hr/it/
Currently translated at 100.0% (19 of 19 strings)

Translation: project-19.0/project-19.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_hr/sl/
Currently translated at 89.4% (17 of 19 strings)

Translation: project-19.0/project-19.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_hr/de/
Currently translated at 100.0% (19 of 19 strings)

Translation: project-19.0/project-19.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_hr/de/
Currently translated at 100.0% (19 of 19 strings)

Translation: project-19.0/project-19.0-project_hr
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_hr/it/
domain_user_ids is needed by the project sharing task form, but it was
not portal readable and its compute read hr categories without sudo.
Assisted-by: Claude Opus 5.5
- The task kanban card is now its own view (project.view_task_card), so
  the assignee domain field is added there.
- The computed domains become Json fields: a 20.0 Binary field only
  takes BinaryValue. Json stores an empty list as False, which the web
  client cannot parse, so the category domain defaults to Domain.TRUE.
- Tests run as a project manager and HR officer (20.0 BaseCommon runs
  tests as a test user, not as superuser), who also gets company B for
  the multi-company test. The portal collaborator gets "edit" access
  (20.0 collaborators default to "view"), and the regular-user test
  reads the linked employees with sudo (20.0 x2many fields only return
  readable records).

Assisted-by: Claude Opus 5.5
@oca-cla-bot

oca-cla-bot Bot commented Nov 27, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@AyushPatel2021 AyushPatel2021 mentioned this pull request Nov 27, 2026
3 of 43 tasks
@AyushPatel2021

Copy link
Copy Markdown
Author

@pedrobaeza @xavierbol @BhaveshHeliconia @ThiagoMForgeFlow could you have a look at this migration when you have a moment? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.