Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
6211 Visualizzazioni

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

Avatar
Abbandona
Autore Risposta migliore

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.

Avatar
Abbandona

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

Risposta migliore

just add required in your field

example :

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

and this popup is automatically displayed.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
set 23
9306
2
lug 25
1914
2
lug 25
8373
1
mag 25
1334
2
mag 25
1961