İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
4002 Görünümler

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
Vazgeç

You can use "@api.constrains".

@api.constrains("your_field")

def alert(self):

if ??<??:

raise exceptions.ValidationError(u"Your Alert")

En İyi Yanıt
from openerp.exceptions import ValidationError
 
#check your desired condition....
raise ValidationError("""your alert message goes here""")

Hope this will helps you

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Nis 25
1648
1
Ağu 24
2581
3
May 24
12322
1
Eyl 23
4187
0
Ağu 23
2115