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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухгалтерия
- Склад
- PoS
- Проекты
- MRP
Этот вопрос был отмечен
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
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.
I got your need. For now I don't have a clue for it. It needs some more search and ideas gathering.
Не оставайтесь в стороне – присоединяйтесь к обсуждению!
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
|
0
дек. 17
|
5129 | ||
|
|
3
июл. 25
|
9804 | ||
|
|
1
мая 25
|
2033 | ||
|
|
0
янв. 24
|
2627 | ||
|
|
1
февр. 22
|
25144 |