Skip to content
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

[15.0][ENH] hr_operating_unit: add OU to department #562

Closed
wants to merge 2 commits into from

Conversation

ps-tubtim
Copy link
Member

Adds an operating unit to the department

Selection_182

@ps-tubtim ps-tubtim changed the title [ENH] hr_operating_unit: add OU to department [15.0][ENH] hr_operating_unit: add OU to department Feb 14, 2023
Copy link
Member

@Saran440 Saran440 left a comment

Choose a reason for hiding this comment

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

Please, delete filter with domain users. it will see 1 ou only if you add domain user.

name="operating_unit_id"
options="{'no_create': True}"
domain="[('company_id','=', company_id),
('user_ids', 'in', uid)]"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
('user_ids', 'in', uid)]"
]"

Copy link
Member Author

Choose a reason for hiding this comment

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

@Saran440 I already updated it.

<field name="parent_id" position="after">
<field
name="operating_unit_id"
domain="[('user_ids', 'in', uid)]"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
domain="[('user_ids', 'in', uid)]"

Copy link
Member Author

Choose a reason for hiding this comment

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

@Saran440 I already updated it.

@ps-tubtim ps-tubtim force-pushed the 15.0-enh-hr_operating_unit branch from aa03fe7 to 6ae2335 Compare February 15, 2023 06:25
Copy link
Member

@Saran440 Saran440 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Saran440 Saran440 force-pushed the 15.0-enh-hr_operating_unit branch from 7138689 to cbf8048 Compare March 8, 2023 04:08
@Saran440
Copy link
Member

Saran440 commented Mar 8, 2023

This PR fixed domain users in hr.employee

Selection_012

Copy link
Member

@TheerayutEncoder TheerayutEncoder left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@AaronHForgeFlow
Copy link
Contributor

I am not a user of this module, but this change seems legit. I would recommend to do a migration script to prefill the information in the department.

@Saran440
Copy link
Member

Saran440 commented Jun 9, 2023

@AaronHForgeFlow I think this enhance shouldn't migration script because all department will default 1 OU

Example:

Case 1 (No script)
Deparmtent A - No OU
Deparmtent B - No OU
Deparmtent C - No OU
Deparmtent D - No OU

Case 2 (there is script)
Deparmtent A - OU 1
Deparmtent B - OU 1
Deparmtent C - OU 1
Deparmtent D - OU 1

Case1 all user can see department
Case2 user OU1 can see all department, it must change some department to correct OU
I think case1 is makesense more than

What do you think?

@Saran440 Saran440 force-pushed the 15.0-enh-hr_operating_unit branch from c63367f to ce99855 Compare June 9, 2023 09:03
@AaronHForgeFlow
Copy link
Contributor

@Saran440 , I think that makes sense.

Would it make sense to put a restriction so the operating unit of the employee cannot be different from the operating unit of the department?

In any case I am not using this module and I prefer actual users to discuss this.

@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). 🤖

@Saran440 Saran440 force-pushed the 15.0-enh-hr_operating_unit branch from eb3fe2e to 3c5f7c0 Compare September 19, 2023 08:30
@ps-tubtim ps-tubtim force-pushed the 15.0-enh-hr_operating_unit branch from 3c5f7c0 to 3669f30 Compare October 26, 2023 09:15
@ps-tubtim ps-tubtim force-pushed the 15.0-enh-hr_operating_unit branch from 3669f30 to 183732c Compare January 18, 2024 06:00
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

@ps-tubtim as the change is quite major and I am not using this module I would rather like to have more approvals from actual users. Code LG

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 19, 2024
@AaronHForgeFlow AaronHForgeFlow removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 21, 2024
@Saran440 Saran440 force-pushed the 15.0-enh-hr_operating_unit branch from 183732c to 960774b Compare July 8, 2024 04:20
@Saran440 Saran440 force-pushed the 15.0-enh-hr_operating_unit branch from 960774b to a2cdfc1 Compare July 8, 2024 04:21
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 29, 2024
@github-actions github-actions bot closed this Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ready to merge stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants