Skip to content

[15.0][MIG] project_hr: Migration to 15.0 #1058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
May 25, 2023

Conversation

chandni299
Copy link
Contributor

No description provided.

pedrobaeza and others added 25 commits February 1, 2023 17:27
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/
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 <[email protected]>

[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/
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/
@chandni299
Copy link
Contributor Author

@pedrobaeza @sbidoul , how we can solve this pre-commit error?
https://github.com/OCA/project/actions/runs/4066569768/jobs/7002827817

@sbidoul
Copy link
Member

sbidoul commented Feb 2, 2023

@chandni299 run pipx run copier -f update in the repo, and commit the resulting change.

@pedrobaeza
Copy link
Member

I have done it for you on #1059

@chandni299 chandni299 force-pushed the 15.0-mig-project_hr_cpatel branch from 0be69cb to 0c4459b Compare February 3, 2023 08:26
@chandni299
Copy link
Contributor Author

It works :)
Thank you so much for your help here @pedrobaeza @sbidoul 👍

Copy link
Contributor

@pilarvargas-tecnativa pilarvargas-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

class ProjectTask(models.Model):
_inherit = "project.task"

employee_id = fields.Many2one(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field should be changed as well as the user_ids to many2many employee_ids.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @pedrobaeza , Thank you for your review.
I have added the requested changes. You can have a look.

@pilarvargas-tecnativa
Copy link
Contributor

@chandni299 Can you make the changes Pedro suggested?

@chandni299
Copy link
Contributor Author

@chandni299 Can you make the changes Pedro suggested?

Sure. Done

@pedrobaeza
Copy link
Member

/ocabot migration project_hr

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone May 25, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request May 25, 2023
32 tasks
@pedrobaeza
Copy link
Member

Thanks for the changes, @chandni299. Please squash the latest commit with the migration one, as the change to m2m is part of the migration itself.

@chandni299 chandni299 force-pushed the 15.0-mig-project_hr_cpatel branch from 792aaf6 to 21b4255 Compare May 25, 2023 08:05
@chandni299
Copy link
Contributor Author

The latest commit is squashed with the migration one @pedrobaeza

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-1058-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot OCA-git-bot merged commit bc2b352 into OCA:15.0 May 25, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 4e9094c. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.