Odoo Help

0

odoo 9 show user popups

By
ahmed khakwani
on 1/12/16, 8:26 AM 3,659 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

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/12/16, 8:26 AM
Seen: 3659 times
Last updated: 1/13/16, 7:24 AM