Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
9033 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore Risposta migliore


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
ott 23
2972
4
dic 21
32995
2
ago 18
7556
1
lug 17
4539
2
set 16
7992