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

warning in msg box

By
isio-odoo
on 4/7/15, 3:07 PM 373 views

How i can show a alert message to the client 

1
Alby Antony
On 4/9/15, 1:09 AM

from openerp.tools.translate import _

raise osv.except_osv(_('Invalid Action!'), _('You can not create this payment. reconfirm the form once again.'))



0

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 8/5/15, 7:30 AM

Isio,

Exception is the way to go, but for an another idea , please check if the popup reminder helps you on this.

Here is the module : https://www.odoo.com/apps/modules/8.0/popup_reminder

Thanks.

0
Shawn Varghese
On 4/8/15, 8:52 AM

Could you explain the use case in more detail?

  • If you want to pop up the alert on click of a button, you could use:

<button string="my_button" confirm="Are you sure?" />

         This will be in the XML file


  • If you want to raise it as an alert on programming logic, you could use:

raise osv.except_osv(('Permission Denied!'),('You are not allowed to perform this operation.')) 

         This will be in .py file


  • If you want it on click of some javascript event, then:

alert("Error !");

         This would be in your .js file.


Please describe the scenario you want to show this error.





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

2 follower(s)

Stats

Asked: 4/7/15, 3:07 PM
Seen: 373 times
Last updated: 8/5/15, 7:30 AM