コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
9084 ビュー

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

アバター
破棄
最善の回答

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
10月 23
3019
4
12月 21
33226
2
8月 18
7635
1
7月 17
4607
2
9月 16
8078