Skip to Content
Menu
This question has been flagged
1 Reply
10639 Views

I have a button, and I would like to implement a behavior that, when the user clicks on this button, a pop-up message appears with a refresh of the actual view.

I already have the refresh behavior, but I don't know how to create the pop-up message and how to implement it with the refresh.

Avatar
Discard
Best Answer

Hi,

To get the Pop up, you can use alert in the js, if you are not satisfied with it, you can use this community module to generate the pop up,  Popup notifications .

After installation of this module, you can generate the pop up from python like this,

values = {'status': 'draft', 'title': u'Be notified about',
'message': "Do not forget to send notification in 21.04.17", 'partner_ids': [(6, 0, [1, 2, 3])]}
self.env['popup.notification'].create(values)

Thanks

Avatar
Discard
Author

Do you have an example for alert in js ? For the community module, I don't want to notify some users, I just want to appear a pop-up message when the user clicks on the button.

here button id :submit_button, js file for pop up

odoo.define('az_admission.website_az_admission', function (require) {

'use strict';

var ajax = require('web.ajax');

var base = require('web_editor.base');

var core = require('web.core');

var _t = core._t;

$(document).on('click',"#submit_button",function() {

alert("testing ")

Related Posts Replies Views Activity
2
Oct 15
19959
3
Jun 21
8080
2
Dec 19
4114
0
Dec 17
4543
1
Mar 15
6112