Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
5241 Vizualizări

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!

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
apr. 15
7918
1
aug. 25
172
1
iun. 25
1205
1
iun. 25
866
1
iun. 25
2477