Skip to Content
Menu
This question has been flagged
2 Replies
9035 Zobrazenia

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

Avatar
Zrušiť
Best Answer

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

Avatar
Zrušiť
Autor Best Answer


Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
okt 23
2973
4
dec 21
33007
2
aug 18
7568
1
júl 17
4547
2
sep 16
8001