Odoo Help

Welcome!

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

0

Warning message in on change (V9)

By
John Touba
on 2/16/16, 6:20 AM 330 views

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. 


0
Krupesh Laiya
On 2/16/16, 7:08 AM

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/16/16, 6:20 AM
Seen: 330 times
Last updated: 2/16/16, 7:08 AM