This question has been flagged
2 Replies
4133 Views

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
Discard
Author Best Answer

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
Discard
Best Answer

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
Discard