Skip to content

[IMP] base_tier_validation: support res.groups in addition to res.users in field-based validation #1081

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

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

kevinkhao
Copy link
Contributor

@kevinkhao kevinkhao commented May 20, 2025

No description provided.

@OCA-git-bot
Copy link
Contributor

Hi @LoisRForgeFlow,
some modules you are maintaining are being modified, check this out!

@kevinkhao kevinkhao changed the title [IMP] base_tier_validation: support res.groups in addition to res.use… [IMP] base_tier_validation: support res.groups in addition to res.users in field-based validation May 20, 2025
@kevinkhao kevinkhao force-pushed the 18.0-base_tier_validation_group branch from 7e58ca6 to 6425290 Compare May 20, 2025 06:51
@kevinkhao kevinkhao force-pushed the 18.0-base_tier_validation_group branch from 6425290 to b0a4f98 Compare May 20, 2025 07:23
def _check_reviewers(self, resource):
if not resource or resource._name not in ["res.users", "res.groups"]:
raise ValidationError(
self.env._("There are no res.users in the selected field")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is too technical message.

Suggested change
self.env._("There are no res.users in the selected field")
self.env._("There are no user or group in the selected field")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@kevinkhao kevinkhao force-pushed the 18.0-base_tier_validation_group branch from b0a4f98 to 0e382fc Compare May 20, 2025 07:32
@kevinkhao kevinkhao force-pushed the 18.0-base_tier_validation_group branch from 0e382fc to f9db455 Compare May 20, 2025 07:33
return self.env["res.users"]

def _check_reviewers(self, resource):
if not resource or resource._name not in ["res.users", "res.groups"]:
Copy link
Member

Choose a reason for hiding this comment

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

You don't actually seem to pass groups here. Shouldn't resource always be res.users?

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

Successfully merging this pull request may close these issues.

4 participants