Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to display a message to user (trnasparent div in the top right corner)

By
Martin Pishpecki
on 10/9/14, 9:58 AM 873 views

Hello,

Can anyone help me with this. I would like to display a message to the user. The type of message that appears in the top right corner (example: "Odoo Apps will be available soon Showing locally available modules" when you click on Apps).

Thank you.

0
Martin Pishpecki
On 2/11/15, 5:25 AM

In short:

return {
      'type': 'ir.actions.client',
      'tag': 'action_warn',
      'name': 'Failure',
      'params': {
            'title': 'Postage Cancellation Failed',
            'text': 'Shipment is outside the void period.',
            'sticky': True
            }
       }

This guy explains it better :
http://ryepdx.com/2014/12/message-boxes-in-openerpodoo/

1

aneesh ATEES Infomedia Pvt Ltd

--aneesh ATEES Infomedia Pvt Ltd--
765
| 5 1 6
Thrissur, India
--aneesh ATEES Infomedia Pvt Ltd--

9995074692

aneesh ATEES Infomedia Pvt Ltd
On 2/11/15, 6:48 AM

{ 'type': 'ir.actions.client', 'tag': 'action_warn', 'name': 'Failure', 'params': { 'title': 'Postage Cancellation Failed', 'text': 'Shipment is outside the void period.', 'sticky': True } }

Here’s a fuller example for those of you who need more illustration:

from openerp.osv import fields, osv from openerp.tools.translate import _ class growling_growler(osv.osv): _name = "growling.growler" _columns = { 'name': fields.char( 'Name', size=32, required=True ) } def growl(self, cr, uid, ids, context=None): return { 'type': 'ir.actions.client', 'tag': 'action_info', 'name': _('Growl'), 'params': { 'title': _('Grr...'), 'text': _('I am growling at you!'), 'sticky': False } }

<?xml version="1.0" encoding="UTF-8"?> <openerp> <data> <record id="growling_growler_tree" model="ir.ui.view"> <field name="name"> growling.growler.tree </field> <field name="model"> growling.growler </field> <field name="arch" type="xml"> <tree string='Growling Growlers'> <field name='name'/> <button string="Growl!" name="growl" type="object" /> </tree> </field> </record> </data>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/9/14, 9:58 AM
Seen: 873 times
Last updated: 3/16/15, 8:10 AM