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

Yes/No message box

By
José
on 12/19/14, 6:14 AM 945 views

Hello, I am developing a module in Odoo8 and I want to show a message box with the buttons "Yes" and "No". If the user presses "Yes", te execution of the method continues, if presses not, no. How can I do this?

Thanks!

1

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 12/19/14, 6:42 AM

You can use confirm="Some confirm message" tag in xml view definition (put it on button)... 
It will popup a message with cancel/continue (not realy yes/no, but works the same)

 

hope it helps

0
José
On 12/19/14, 7:57 AM

Thanks! How can I control this messagebox from Python code? For example, when the message box is showed and what action do if the user presses confirm, or not?

Well, you put confirm tag on BUTTON, and user has to decide based on message will he continue or not, but if you place3 it on BUTTON, then logicaly, it will or not continue execution of whatever button triggers (method, action, workflow...)

Bole
on 12/22/14, 2:44 AM

Sorry but I am principiant. Can you tell me an example of how can I display a confirm message from a method in Python and then catch the result in this method, to decide how continue? Thanks!

José
on 12/22/14, 8:20 AM

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: 12/19/14, 6:14 AM
Seen: 945 times
Last updated: 3/16/15, 8:10 AM