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

Hi,

For example, when you have some required fields in a view and you try to save without filling them, you get that nice popup on the top right corner saying "The following fields are invalid".

How could I display such a thing in my modules?

Thanks

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

In fact, I was wondering if it's possible to use it for other purposes than check required fields. For example, I have a python function performing a check on the values entered, and I'd like to use this kind of popup instead of the usual messagebox. What interests me in this popup is that it doesn't take the focus and oblige the user to click ok before doing something else.

الصورة الرمزية
إهمال

okay, sorry I not have idea. but this popup take the focus just tap Enter (I have tested it with chrome and firefox).

أفضل إجابة

just add required in your field

example :

 'name': fields.char("Name ",size=128,required=True),

and this popup is automatically displayed.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 23
9335
2
يوليو 25
1936
2
يوليو 25
8456
1
مايو 25
1358
2
مايو 25
1985