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

[16.0][MIG] operating_unit: migration to 16.0 #576

Merged
merged 75 commits into from
Apr 12, 2023

Conversation

huguesdk
Copy link
Member

No description provided.

sudhir-serpentcs and others added 30 commits March 17, 2023 13:48
* [MIG] operating_unit to v10.0
@huguesdk
Copy link
Member Author

/ocabot migration operating_unit

@OCA-git-bot
Copy link
Contributor

Sorry @huguesdk you are not allowed to mark the addon tobe migrated.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

Copy link
Contributor

@alan196 alan196 left a comment

Choose a reason for hiding this comment

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

👍 Technical review

@AaronHForgeFlow
Copy link
Contributor

/ocabot migration operating_unit

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Mar 21, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Mar 21, 2023
10 tasks
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.

Functional review. I can remove operating unit for users except for the admin, If I remove the operating unit for the admin and I jump out and jump in again the user form view of the admin I see all OUs are assigned. Can't remove. Could you check that?

@houssine78
Copy link
Sponsor

Hi @huguesdk, did you see the comment from Aaron ? Does it needs action from your side ? It's an improvement or this should work as the Aaron's expectations ?

Thank you :)

@huguesdk
Copy link
Member Author

hi @houssine78. yes, i saw the comment, but thanks for the heads up! i did not intend to change the behavior, so if it does not work as in 15.0, then i need to fix it.

@AaronHForgeFlow: thanks for the review! do you know if this is something that works as expected in 15.0?

@@ -41,22 +42,6 @@ class OperatingUnit(models.Model):
),
]

@api.model
def name_search(self, name="", args=None, operator="ilike", limit=100):
Copy link
Member

Choose a reason for hiding this comment

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

is there a reason for the removal of the name_search method?

Copy link
Member Author

@huguesdk huguesdk Apr 11, 2023

Choose a reason for hiding this comment

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

yes, it is because the new _rec_names_search class variable now allows for the same behavior without the need to define .name_search(). see the guide to migrate to 16.0.

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

@huguesdk
Copy link
Member Author

Functional review. I can remove operating unit for users except for the admin, If I remove the operating unit for the admin and I jump out and jump in again the user form view of the admin I see all OUs are assigned. Can't remove. Could you check that?

@AaronHForgeFlow: i tested in 15.0 and the behavior is the same. it comes from this code, which forces the users belonging to the operating_unit.group_manager_operating_unit group to have all operating units linked to them.

@AaronHForgeFlow
Copy link
Contributor

Thanks for checking @huguesdk I think that is ok then. I just won't assign users to that group when they don't have access to all OU.

@AaronHForgeFlow
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-576-by-AaronHForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 840a02a into OCA:16.0 Apr 12, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 60ca2d0. 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.