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

i, i want to display a message box like this: 

https://drive.google.com/file/d/0B7CW3Xb1Km8uMHZkN3lPQW96bVk/view?usp=sharing

I am using odoo 8.0

Thanks!

Avatar
Abbandona
Autore Risposta migliore

oo ok thanks for the observation. I want to display that type of message when i create a form (with @api.constrains) if a field does not have only letters. Odoo already shows this pop up when i enter a letter in a fields.Float and i try to save the form, but i can't "call" this pop up message to a fields.Char with a condition with isalpha(). In other blogs (stackoverflow) I found this code to do that i want:

{ 'type': 'ir.actions.client', 'tag': 'action_warn', 'name': 'Warning', 'params': { 'title': 'Warning!', 'text': 'Entered Quantity is greater than quantity on source.', 'sticky': True } }

But this didn't do anything. I tried to do it without the @api.constrains but didn't works either. I could use a warning like this:

     'warning': {
             'title': 'Invalid value',
         'message': 'Use only letters.'
                 }
                 

But i don't want it because its looks better with a pop up message.

Avatar
Abbandona
Risposta migliore

You need to ask for something specific, provide the scenarios that you need that working and how you are trying to solve it. A mean your post doesn't look like a question, it's more like who do this for me? 

Better you should ask for where your could find a module that does that kind of feature messages.

That message box is triggered by Odoo form validation so If you wanna do it like that you need to use the similar code used by Odoo but applied to your situation scenarios, surely a new widget or extension need to be developed for that depending on your needs

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
apr 15
7883
1
giu 25
1174
1
giu 25
780
1
giu 25
2419
0
mag 25
901