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
base: 14.0
Are you sure you want to change the base?
Conversation
Hi @LoisRForgeFlow, |
record = self.env[self.model].browse(self.res_id) | ||
post = "message_post" | ||
if hasattr(record, post): | ||
getattr(record.sudo(), post)( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)", |
No description provided.