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

G2P-1436 pop message when clicking notify registrants #18

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions g2p_notifications_base/models/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,18 @@ def notify_eligible_beneficiaries(self):
manager.on_enrolled_in_program(partners_to_notify)
for mem in partners_to_notify:
mem.is_enrolled_notification_sent = True
message = _("Notifications are initiated")
return {
"type": "ir.actions.client",
"tag": "display_notification",
"params": {
"title": _("Notification"),
"message": message,
"sticky": True,
"next": {
"type": "ir.actions.act_window_close",
},
},
}
else:
raise UserError(_("No Notification Manager defined."))
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
placeholder="Select a program..."
options="{'no_open':True,'no_create':True,'no_create_edit':True}"
invisible="context.get('default_program_id',False)"
domain="[('state','=','active')]"
/>
</h2>
</div>
Expand Down
Loading