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

odoo 9 show user popups

By
ahmed khakwani
on 1/12/16, 8:26 AM 2,064 views

I am working on odoo 9. I need to show popup. I am using that code to show popup

raise osv.except_osv(_('UserError!'), _("Invoice not completed yet. Please complete that invoice"))

and it shows that message

"WARNING odoo openerp.exceptions: except_orm is deprecated. Please use specific exceptions like UserError or AccessError", and popup never shows up. Please help me in that

Another thing, for example if i have invoice id 1, or any other invoice info. I want to show user an lnvoice link, when user click on that link user will be redirected to that invoice. Please help me in that

2
Swapnesh
On 1/13/16, 6:43 AM

Hello Ahmed,


Please Use

from openerp.exceptions import  Warning


if condition:

    raise Warning("Message")

OR

from openerp.exceptions import except_orm,

if condition:

     raise except_orm(_('Warning'), _('Message'))



Thanks

0
ahmed khakwani
On 1/13/16, 7:24 AM


Please Accept Answer if you find this helpful.

Swapnesh
on 1/16/16, 3:30 PM

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: 1/12/16, 8:26 AM
Seen: 2064 times
Last updated: 1/13/16, 7:24 AM