Show message to user (or popup)

Asked by Damián Soriano

I am overriding the write method of the sale.order object. I want to inform the user of some things when the object is successfully saved (and I cannot raise an exception since it will roll back the write).

I tried returning something like

result = {'view_type' : 'form',
                'view_mode' : 'form',
                'view_id' : the_id_of_the_view,
                'res_model' : 'model_of_the_view',
                'type' : 'ir.actions.act_window',
                'target' : 'new',
                'context' : context,}

but still I cannot show any information to the user. I thought that it may be possible to call an action to display a view, something like wizards do, but cannot find any information or nothing.

Question information

English Edit question
Odoo Server (MOVED TO GITHUB) Edit question
No assignee Edit question
Solved by:
Serpent Consulting Services
Last query:
Last reply:
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :


You can surely use a wizard just to notify the user in terms of a popup.

Additionally, if you are using web client, you would love to use the logging feature of OpenERP.

message = _("The sales order has been confirmed.")
self.log(cr, uid, id, message)

Hope this helps certainly.

Serpent Consulting Services.

Revision history for this message
Damián Soriano (damiansoriano) said :

But it is possible to lunch the wizard from the ORM method 'write'?? How?

Regarding the logging, if I didn't misunderstood it, in the OpenERP days last week someone said that this facility will be removed, right?


Revision history for this message
Damián Soriano (damiansoriano) said :

I mean, will be remove in version 7.0

Revision history for this message
Best Serpent Consulting Services (serpent-consulting-services) said :

Heard and Caught rightly, the 7.0 will remove it. But, there will be an alternate for it.

For now, this can serve your aim.

And, write cannot use the wizard call unfortunately.


Revision history for this message
Damián Soriano (damiansoriano) said :

Thanks Serpent Consulting Services, that solved my question.