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

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.

Imagine profil
Abandonează

You can use "@api.constrains".

@api.constrains("your_field")

def alert(self):

if ??<??:

raise exceptions.ValidationError(u"Your Alert")

Cel mai bun răspuns
from openerp.exceptions import ValidationError
 
#check your desired condition....
raise ValidationError("""your alert message goes here""")

Hope this will helps you

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
3
apr. 25
1403
1
aug. 24
2206
3
mai 24
11600
1
sept. 23
3750
0
aug. 23
1820