Odoo Help


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.


Warning / Confirm dialog box without blocking flow

Shawn Varghese
on 8/8/15, 12:11 PM 701 views

Does anyone know how to create a warning / confirm box without blocking the flow of execution? I want to check for a condition, and based on that alert the user of it. But if the user willingly wants to continue, they should be able to. Therefore I cannot use a simple raise statement. I saw a module called 'warning_box' in Odoo Apps, but this does not solve the purpose.


Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.



Tarek Mohamed Ibrahim
On 8/8/15, 4:02 PM

Try to add the confirm option sam as the button definition:

 <button name="cancel_voucher" string="Cancel Voucher" type="object" states="posted" confirm="Are you sure you want to unreconcile this record?"/> 

you can find this in the 'account_voucher\account_voucher_view.xml' 

after posting my reply I searched again and found that this question has been replied before, pls check https://www.odoo.com/nl_NL/forum/help-1/question/how-to-add-confirm-dialog-box-on-button-or-action-2054

Tarek Mohamed Ibrahim
on 8/8/15, 4:05 PM

Thanks Tarek, but this confirm box will always be triggered. I want to trigger it only on a certain condition. I have seen the other post as well, but I would have to create a separate wizard for each case, which is a tedious task. Basically a confirm box with a condition would be best.

Shawn Varghese
on 8/9/15, 12:52 AM

I got your need. For now I don't have a clue for it. It needs some more search and ideas gathering.

Tarek Mohamed Ibrahim
on 8/9/15, 1:42 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)


Asked: 8/8/15, 12:11 PM
Seen: 701 times
Last updated: 8/8/15, 4:02 PM