跳至內容
選單
此問題已被標幟
1 回覆
4299 瀏覽次數

Hello all,


I have a problem with the warning message in V9 .

In my onchange, I want return a no blocking message .  For this I use this piece of code . 

    message = {'title': _('Title'),'message': _('Message')}

return {'value': {}, 'warning':message}


but Odoo don't show my message.


Many thanks in advance for you assistance. 


頭像
捨棄
最佳答案

Here is the example for the v9



if not part:

warning = {

'title': _('Warning!'),

'message': _('You must first select a partner!'),

}

return {'warning': warning}


or you can find the exact example for v9 in accoun_invoice.py module named account on line no. 1122

Hope this will help you.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 22
2481
1
3月 21
7408
2
7月 19
4069
2
2月 19
3907
0
12月 17
4290