تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
1988 أدوات العرض

In odoo, with a Python "raise warning" command I am able to launch a window that warns me of any error in a form. But until I fix that bug I can't save the form.

Now I want to create a simple confirmation window, that if I hit OK it will let me save the form.

Is there a command for this in Python?

Thank you very much.

الصورة الرمزية
إهمال
الكاتب

is there a way to do this with python in an automatic action?

like: raise Warning("xxxx")

but instead of RAISE WARNING, another command?

Thanks!

الكاتب أفضل إجابة

is there a way to do this with python in an automatic action?

like: raise Warning("xxxx")

but instead of RAISE WARNING, another command?

Thanks!

الصورة الرمزية
إهمال
أفضل إجابة

two possible solutions:

1. using attribute "confirm" on view of button

2. create wizard to do as your needs

الصورة الرمزية
إهمال
أفضل إجابة

I added directly in the view of the model.

<button name="buttonClickEvent" string="Approve" type="object" class="oe_highlight"
confirm="Proceed to Approve Call?"/>


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مارس 25
1319
4
أبريل 24
174170
0
ديسمبر 23
2098
5
يوليو 25
227828
1
ديسمبر 22
3220