Skip to content

Commit 690131c

Browse files
committed
[IMP] spp_idqueue: add display notification on request
1 parent e339bd7 commit 690131c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

spp_idqueue/wizard/request_id_wizard.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,24 @@ def request_id(self):
4949
"status": status,
5050
"registrant_id": rec.registrant_id.id,
5151
}
52-
return self.env["spp.print.queue.id"].create(vals)
52+
self.env["spp.print.queue.id"].create(vals)
53+
message = _(
54+
"A new ID request has been successfully created for registrant: %s.", rec.registrant_id.name
55+
)
56+
kind = "info"
57+
return {
58+
"type": "ir.actions.client",
59+
"tag": "display_notification",
60+
"params": {
61+
"title": _("ID Request"),
62+
"message": message,
63+
"sticky": True,
64+
"type": kind,
65+
"next": {
66+
"type": "ir.actions.act_window_close",
67+
},
68+
},
69+
}
5370
else:
5471
raise UserError(_("There are no selected Template!"))
5572

0 commit comments

Comments
 (0)