Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
3725 Vistas

Hi, 
Can anyone help me with this?
I need a popup/alert everytime the user(s) set the selling price less than the cost price, so that they would have to set the selling price equal to or greater than the cost price.

Thanks.

Avatar
Descartar

You can use "@api.constrains".

@api.constrains("your_field")

def alert(self):

if ??<??:

raise exceptions.ValidationError(u"Your Alert")

Mejor respuesta
from openerp.exceptions import ValidationError
 
#check your desired condition....
raise ValidationError("""your alert message goes here""")

Hope this will helps you

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
abr 25
1378
1
ago 24
2186
3
may 24
11514
1
sept 23
3714
0
ago 23
1803