コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3822 ビュー

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

アバター
破棄
関連投稿 返信 ビュー 活動
3
4月 25
1461
1
8月 24
2296
3
5月 24
11734
1
9月 23
3839
0
8月 23
1846