Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
3833 Переглядів

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.

Аватар
Відмінити

You can use "@api.constrains".

@api.constrains("your_field")

def alert(self):

if ??<??:

raise exceptions.ValidationError(u"Your Alert")

Найкраща відповідь
from openerp.exceptions import ValidationError
 
#check your desired condition....
raise ValidationError("""your alert message goes here""")

Hope this will helps you

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
3
квіт. 25
1475
1
серп. 24
2311
3
трав. 24
11767
POS Session wont close Вирішено
1
вер. 23
3856
0
серп. 23
1877