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

[14.0][IMP] Add reminder to base_tier_validation #873

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

Conversation

TDu
Copy link
Member

@TDu TDu commented May 6, 2024

No description provided.

@OCA-git-bot
Copy link
Contributor

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

@TDu TDu changed the title [14.0] [IMP] Add reminder to base_tier_validation [14.0][IMP] Add reminder to base_tier_validation May 6, 2024
record = self.env[self.model].browse(self.res_id)
post = "message_post"
if hasattr(record, post):
getattr(record.sudo(), post)(
Copy link
Contributor

@simahawk simahawk May 6, 2024

Choose a reason for hiding this comment

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

why posting a msg rather than creating an activity?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it can be done only if the model inheriting from tier.validation also inherits from mail.activity.mixin and not only mail.thread 😬

EDIT: There's another issue with activities if the tier definition requests validation to a group. As an activity can be assigned to only one user, we don't want to schedule an activity for each user in the group. I'd suggest to keep the version from @TDu or it would make things much more complicated than they need to be.

@@ -72,6 +72,10 @@ def _get_tier_validation_model_names(self):
"this definition is triggered.",
)
has_comment = fields.Boolean(string="Comment", default=False)
notify_reminder_delay = fields.Integer(
string="Remind notifier",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
string="Remind notifier",
string="Send reminder message on pending reviews",

@@ -72,6 +72,10 @@ def _get_tier_validation_model_names(self):
"this definition is triggered.",
)
has_comment = fields.Boolean(string="Comment", default=False)
notify_reminder_delay = fields.Integer(
string="Remind notifier",
help="Number of days after which the user should be reminded (0 = no reminder)",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
help="Number of days after which the user should be reminded (0 = no reminder)",
help="Number of days after which a message must be posted to remind about pending validation (0 = no reminder)",

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.

None yet

4 participants